Remove WebVector: Automatic changes
Replace WebVector (which has been an alias of std::vector since crrev.com/c/6204022) with std::vector. function cg() { git grep --name-only "$1" -- *.mm *.h *.cc } sed -i 's/include.*web_vector.h"/include <vector>/' `cg web_vector.h` sed -i '/^using blink::WebVector;/d' `cg 'using blink::WebVector'` sed -i '/^using ::blink::WebVector;/d' `cg 'using ::blink::WebVector'` sed -i 's/blink::WebVector\b/std::vector/g' `cg blink::WebVector` sed -i 's/\bWebVector\b/std::vector/g' `cg WebVector` git checkout -- third_party/blink/public/platform/web_vector.h git cl format Only manual changes are to remove unused "#include <vector>" added by the above script, based on presubmit warnings. BYPASS_LARGE_CHANGE_WARNING=`git cl split` will create too many CLs needing too many reviewers while this CL doesn't need much manual review. Bug: 40865165 Change-Id: Ib70af44863ceaa73f470c77abe74d8994e2822a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6209609 Owners-Override: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#1412669}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
80c4cf6e5b
commit
aece0d42b5
android_webview/renderer
chrome/renderer
autofill
chrome_content_renderer_client.ccchrome_content_renderer_client.hextensions
render_frame_font_family_accessor.ccurl_loader_throttle_provider_impl.ccurl_loader_throttle_provider_impl.hchromecast/renderer
components
autofill
content
renderer
autofill_agent_browsertest.ccdom_label_browsertest.ccform_autofill_issues.ccform_autofill_issues.hform_autofill_util.ccform_autofill_util.hform_autofill_util_browsertest.ccpage_passwords_analyser.ccpassword_autofill_agent.ccpassword_autofill_agent.hpassword_form_conversion_utils_browsertest.ccpassword_generation_agent.cc
cast_receiver
content_capture
renderer
pdf
renderer
plugins
renderer
spellcheck
renderer
translate
content
renderer
webapps
renderer
webcrypto
content
child
child_process_sandbox_support_impl_linux.ccchild_process_sandbox_support_impl_win.ccchild_process_sandbox_support_impl_win.h
public
renderer
accessibility
annotations
media
pepper
render_frame_impl.hrender_thread_impl.ccrender_widget_browsertest.ccrenderer_blink_platform_impl.ccrenderer_blink_platform_impl.hshell
renderer
web_test
extensions/renderer
fuchsia_web/webengine/renderer
headless/lib/renderer
pdf
third_party/blink
public
platform
media
modules
mediastream
service_worker
video_capture
win
web
blink.hweb_ax_object.hweb_content_capture_client.hweb_content_holder.hweb_document.hweb_dom_message_event.hweb_element.hweb_embedded_worker.hweb_form_element.hweb_frame.hweb_frame_serializer_client.hweb_frame_widget.hweb_image.hweb_input_element.hweb_local_frame.hweb_local_frame_client.hweb_media_inspector.hweb_navigation_control.hweb_navigation_params.hweb_node.hweb_performance_metrics_for_reporting.hweb_plugin_params.hweb_popup_menu_info.hweb_select_element.hweb_text_check_client.hweb_text_checking_result.hweb_window_features.h
win
renderer
bindings
modules
v8
serialization
controller
core
clipboard
content_capture
css
editing
finder
ime
edit_context.ccime_text_span_vector_builder.ccime_text_span_vector_builder.hinput_method_controller.ccinput_method_controller.hinput_method_controller_test.cc
spellcheck
execution_context
exported
web_dom_message_event.ccweb_drag_data_test.ccweb_element.ccweb_form_element.ccweb_frame_serializer_test.ccweb_image.ccweb_image_test.ccweb_input_method_controller_impl.ccweb_input_method_controller_impl.hweb_node.ccweb_node_test.ccweb_performance_metrics_for_reporting.ccweb_searchable_form_data_test.ccweb_select_element.ccweb_view_impl.ccweb_view_impl.hweb_view_test.cc
frame
attribution_src_loader.cc
csp
dom_viewport.ccfind_in_page.ccfind_in_page.hlocal_frame.cclocal_frame.hpausable_script_executor.ccvisual_viewport_test.ccweb_frame.ccweb_local_frame_impl.ccweb_remote_frame_impl.cchtml
inspector
layout
loader
empty_clients.hloader_factory_for_worker.ccprefetched_signed_exchange_manager.ccprefetched_signed_exchange_manager.h
messaging
navigation_api
page
script
timing
workers
modules
background_fetch
content_index
crypto
encryptedmedia
media_key_session.ccmedia_key_session.hmedia_key_system_access_initializer_base.ccmedia_keys.ccnavigator_request_media_key_system_access.cc
exported
image_downloader
manifest
mediasource
mediastream
mock_media_stream_registry.ccuser_media_client_test.ccuser_media_processor.ccwebaudio_media_stream_audio_sink.ccwebaudio_media_stream_audio_sink.hwebaudio_media_stream_audio_sink_test.cc
payments
peerconnection
adapters
rtc_rtp_receiver.hrtc_stats_report.hrtp_contributing_source_cache.hservice_worker
platform
audio
exported
web_drag_data.ccweb_encrypted_media_request.ccweb_icon_sizes_parser.ccweb_icon_sizes_parser_test.ccweb_url_response.ccweb_url_response_test.cc
graphics
loader
fetch
media
key_system_config_selector.ccweb_audio_source_provider_impl.ccweb_audio_source_provider_impl_test.ccweb_content_decryption_module_session_impl.ccweb_media_player_impl.ccweb_media_player_impl.h
mediastream
mojo
peerconnection
testing
widget
@ -47,13 +47,13 @@ AwURLLoaderThrottleProvider::~AwURLLoaderThrottleProvider() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
AwURLLoaderThrottleProvider::CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
|
||||
// Some throttles have already been added in the browser for frame resources.
|
||||
// Don't add them for frame requests.
|
||||
|
@ -30,7 +30,7 @@ class AwURLLoaderThrottleProvider : public blink::URLLoaderThrottleProvider {
|
||||
|
||||
// blink::URLLoaderThrottleProvider implementation.
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override;
|
||||
void SetOnline(bool is_online) override;
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_autofill_state.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
@ -68,7 +67,6 @@ using blink::WebInputElement;
|
||||
using blink::WebLocalFrame;
|
||||
using blink::WebSelectElement;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
using testing::_;
|
||||
using testing::ElementsAre;
|
||||
using testing::Field;
|
||||
@ -2408,7 +2406,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData) {
|
||||
WebLocalFrame* frame = GetMainFrame();
|
||||
ASSERT_NE(nullptr, frame);
|
||||
|
||||
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, forms.size());
|
||||
|
||||
WebInputElement input_element = GetInputElementById("firstname");
|
||||
@ -2472,7 +2470,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData) {
|
||||
EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[5]);
|
||||
|
||||
// Check renderer_id.
|
||||
WebVector<WebFormControlElement> form_control_elements =
|
||||
std::vector<WebFormControlElement> form_control_elements =
|
||||
forms[0].GetFormControlElements();
|
||||
for (size_t i = 0; i < fields.size(); ++i)
|
||||
EXPECT_EQ(GetFieldRendererId(form_control_elements[i]),
|
||||
@ -2513,7 +2511,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData_TooManyFields) {
|
||||
WebLocalFrame* frame = GetMainFrame();
|
||||
ASSERT_NE(nullptr, frame);
|
||||
|
||||
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, forms.size());
|
||||
ASSERT_FALSE(forms.front().GetFormControlElements().empty());
|
||||
|
||||
@ -2878,7 +2876,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData_Autocomplete) {
|
||||
<input type=submit name='reply-send' value=Send>
|
||||
</form>)");
|
||||
|
||||
WebVector<WebFormElement> web_forms = GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> web_forms = GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, web_forms.size());
|
||||
WebFormElement web_form = web_forms[0];
|
||||
|
||||
@ -4183,7 +4181,7 @@ TEST_F(FormAutofillTest, ThreePartPhone) {
|
||||
WebLocalFrame* frame = GetMainFrame();
|
||||
ASSERT_NE(nullptr, frame);
|
||||
|
||||
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, forms.size());
|
||||
|
||||
FormData form = *ExtractFormData(forms[0]);
|
||||
@ -4236,7 +4234,7 @@ TEST_F(FormAutofillTest, MaxLengthFields) {
|
||||
WebLocalFrame* frame = GetMainFrame();
|
||||
ASSERT_NE(nullptr, frame);
|
||||
|
||||
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, forms.size());
|
||||
|
||||
FormData form = *ExtractFormData(forms[0]);
|
||||
@ -4427,7 +4425,7 @@ TEST_F(FormAutofillTest, UndoAutofill) {
|
||||
HasAutofillValue("autofill_select_option_2",
|
||||
WebAutofillState::kAutofilled));
|
||||
|
||||
WebVector<WebFormElement> forms =
|
||||
std::vector<WebFormElement> forms =
|
||||
GetMainFrame()->GetDocument().GetTopLevelForms();
|
||||
EXPECT_EQ(1U, forms.size());
|
||||
|
||||
@ -4614,7 +4612,7 @@ TEST_F(FormAutofillTest, SelectOneAsText) {
|
||||
frame->GetDocument().GetElementById("country").To<WebSelectElement>();
|
||||
select_element.SetValue(WebString::FromUTF8("AL"));
|
||||
|
||||
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, forms.size());
|
||||
|
||||
FormData form = *ExtractFormData(forms[0]);
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_form_element.h"
|
||||
#include "third_party/blink/public/web/web_frame_widget.h"
|
||||
@ -1319,10 +1318,9 @@ TEST_F(PasswordAutofillAgentTest, IsWebElementVisibleTest) {
|
||||
|
||||
LoadHTML(kVisibleFormWithNoUsernameHTML);
|
||||
frame = GetMainFrame();
|
||||
blink::WebVector<WebFormElement> forms =
|
||||
frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1u, forms.size());
|
||||
blink::WebVector<blink::WebFormControlElement> web_control_elements =
|
||||
std::vector<blink::WebFormControlElement> web_control_elements =
|
||||
forms[0].GetFormControlElements();
|
||||
ASSERT_EQ(1u, web_control_elements.size());
|
||||
EXPECT_TRUE(
|
||||
@ -4179,7 +4177,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
|
||||
// Get the username and password form input elements.
|
||||
blink::WebDocument document = GetMainFrame()->GetDocument();
|
||||
blink::WebVector<WebFormElement> forms = document.GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = document.GetTopLevelForms();
|
||||
WebFormElement form_element = forms[0];
|
||||
std::vector<blink::WebFormControlElement> control_elements =
|
||||
form_util::GetOwnedAutofillableFormControls(document, form_element);
|
||||
|
@ -22,7 +22,6 @@ using blink::WebElement;
|
||||
using blink::WebFormControlElement;
|
||||
using blink::WebFormElement;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace autofill {
|
||||
|
||||
|
@ -285,7 +285,6 @@ using blink::WebURL;
|
||||
using blink::WebURLError;
|
||||
using blink::WebURLRequest;
|
||||
using blink::WebURLResponse;
|
||||
using blink::WebVector;
|
||||
using blink::mojom::FetchCacheMode;
|
||||
using content::RenderFrame;
|
||||
using content::RenderThread;
|
||||
@ -318,14 +317,14 @@ std::vector<url::Origin> GetAdditionalPdfInternalPluginAllowedOrigins() {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
void AppendParams(
|
||||
const std::vector<WebPluginMimeType::Param>& additional_params,
|
||||
WebVector<WebString>* existing_names,
|
||||
WebVector<WebString>* existing_values) {
|
||||
std::vector<WebString>* existing_names,
|
||||
std::vector<WebString>* existing_values) {
|
||||
DCHECK(existing_names->size() == existing_values->size());
|
||||
size_t existing_size = existing_names->size();
|
||||
size_t total_size = existing_size + additional_params.size();
|
||||
|
||||
WebVector<WebString> names(total_size);
|
||||
WebVector<WebString> values(total_size);
|
||||
std::vector<WebString> names(total_size);
|
||||
std::vector<WebString> values(total_size);
|
||||
|
||||
for (size_t i = 0; i < existing_size; ++i) {
|
||||
names[i] = (*existing_names)[i];
|
||||
@ -1859,7 +1858,7 @@ void ChromeContentRendererClient::DidSetUserAgent(
|
||||
|
||||
void ChromeContentRendererClient::AppendContentSecurityPolicy(
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {
|
||||
std::vector<blink::WebContentSecurityPolicyHeader>* csp) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
// Don't apply default CSP to PDF renderers.
|
||||
|
@ -231,7 +231,7 @@ class ChromeContentRendererClient
|
||||
void DidSetUserAgent(const std::string& user_agent) override;
|
||||
void AppendContentSecurityPolicy(
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override;
|
||||
std::vector<blink::WebContentSecurityPolicyHeader>* csp) override;
|
||||
std::unique_ptr<blink::WebLinkPreviewTriggerer> CreateLinkPreviewTriggerer()
|
||||
override;
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/values.h"
|
||||
@ -16,7 +17,6 @@
|
||||
#include "third_party/blink/public/platform/web_crypto_algorithm.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_algorithm_params.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_crypto_normalize.h"
|
||||
|
||||
namespace extensions {
|
||||
@ -66,7 +66,7 @@ v8::Local<v8::Object> WebCryptoAlgorithmToV8Value(
|
||||
if (rsa_hashed_key_gen) {
|
||||
builder.Set("modulusLength", rsa_hashed_key_gen->ModulusLengthBits());
|
||||
|
||||
const blink::WebVector<unsigned char>& public_exponent =
|
||||
const std::vector<unsigned char>& public_exponent =
|
||||
rsa_hashed_key_gen->PublicExponent();
|
||||
v8::Local<v8::ArrayBuffer> buffer =
|
||||
v8::ArrayBuffer::New(isolate, public_exponent.size());
|
||||
|
@ -11,7 +11,7 @@
|
||||
namespace {
|
||||
|
||||
std::vector<std::string> WebStringVectorToStl(
|
||||
const blink::WebVector<blink::WebString>& web_vector) {
|
||||
const std::vector<blink::WebString>& web_vector) {
|
||||
std::vector<std::string> stl_vector;
|
||||
for (const blink::WebString& web_string : web_vector)
|
||||
stl_vector.push_back(web_string.Utf8());
|
||||
|
@ -159,13 +159,13 @@ URLLoaderThrottleProviderImpl::Clone() {
|
||||
main_thread_task_runner_, base::PassKey<URLLoaderThrottleProviderImpl>());
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
URLLoaderThrottleProviderImpl::CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
|
||||
// Some throttles have already been added in the browser for frame resources.
|
||||
// Don't add them for frame requests.
|
||||
|
@ -57,7 +57,7 @@ class URLLoaderThrottleProviderImpl : public blink::URLLoaderThrottleProvider {
|
||||
|
||||
// blink::URLLoaderThrottleProvider implementation.
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override;
|
||||
void SetOnline(bool is_online) override;
|
||||
|
@ -40,13 +40,13 @@ CastURLLoaderThrottleProvider::Clone() {
|
||||
return base::WrapUnique(new CastURLLoaderThrottleProvider(*this));
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
CastURLLoaderThrottleProvider::CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
|
||||
if (cast_activity_url_filter_manager_ && local_frame_token.has_value()) {
|
||||
auto* activity_url_filter = cast_activity_url_filter_manager_
|
||||
|
@ -27,7 +27,7 @@ class CastURLLoaderThrottleProvider : public blink::URLLoaderThrottleProvider {
|
||||
|
||||
// blink::URLLoaderThrottleProvider implementation:
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override;
|
||||
void SetOnline(bool is_online) override;
|
||||
|
@ -716,8 +716,7 @@ TEST_F(AutofillAgentTest, PreviewThenClear) {
|
||||
</form>
|
||||
)");
|
||||
|
||||
blink::WebVector<blink::WebFormElement> forms =
|
||||
GetDocument().GetTopLevelForms();
|
||||
std::vector<blink::WebFormElement> forms = GetDocument().GetTopLevelForms();
|
||||
ASSERT_EQ(1U, forms.size());
|
||||
FormData form = *form_util::ExtractFormData(
|
||||
forms[0].GetDocument(), forms[0],
|
||||
@ -1246,7 +1245,7 @@ TEST_P(AutofillAgentSubmissionTest,
|
||||
kCallTimerStateDummy);
|
||||
ASSERT_TRUE(form.has_value());
|
||||
|
||||
blink::WebVector<blink::WebFormControlElement> field_elements =
|
||||
std::vector<blink::WebFormControlElement> field_elements =
|
||||
form_element.GetFormControlElements();
|
||||
|
||||
for (const blink::WebFormControlElement& field_element : field_elements) {
|
||||
|
@ -99,7 +99,7 @@ class DomLabelTest : public content::RenderViewTest,
|
||||
std::vector<FormData> ExtractFormDatas() {
|
||||
blink::WebDocument document = GetMainFrame()->GetDocument();
|
||||
// `GetTopLevelForms()` returns forms in DOM order.
|
||||
blink::WebVector<blink::WebFormElement> form_elements =
|
||||
std::vector<blink::WebFormElement> form_elements =
|
||||
document.GetTopLevelForms();
|
||||
// Add a null WebFormElement to extract unowned fields into a separate form.
|
||||
form_elements.emplace_back();
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "components/autofill/core/common/form_field_data.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_autofill_client.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element_collection.h"
|
||||
@ -33,7 +32,6 @@ using blink::WebInputElement;
|
||||
using blink::WebLabelElement;
|
||||
using blink::WebLocalFrame;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
using blink::mojom::GenericIssueErrorType;
|
||||
|
||||
namespace autofill::form_issues {
|
||||
@ -113,12 +111,12 @@ int GetShadowHostDOMNodeId(const WebFormControlElement& element) {
|
||||
}
|
||||
|
||||
void MaybeAppendDuplicateIdForInputDevtoolsIssue(
|
||||
const WebVector<WebFormControlElement>& elements,
|
||||
const std::vector<WebFormControlElement>& elements,
|
||||
std::vector<FormIssue>& form_issues) {
|
||||
const WebString& id_attr = GetWebString<kId>();
|
||||
|
||||
// Create copies of |elements| with ids that can be modified
|
||||
WebVector<WebFormControlElement> elements_with_id_attr;
|
||||
std::vector<WebFormControlElement> elements_with_id_attr;
|
||||
elements_with_id_attr.reserve(elements.size());
|
||||
for (const auto& element : elements) {
|
||||
if (IsAutofillableElement(element) && !element.GetIdAttribute().IsEmpty()) {
|
||||
@ -221,8 +219,9 @@ void MaybeAppendInputAssignedAutocompleteValueToIdOrNameAttributesDevtoolsIssue(
|
||||
}
|
||||
}
|
||||
|
||||
void AppendFormIssuesInternal(const WebVector<WebFormControlElement>& elements,
|
||||
std::vector<FormIssue>& form_issues) {
|
||||
void AppendFormIssuesInternal(
|
||||
const std::vector<WebFormControlElement>& elements,
|
||||
std::vector<FormIssue>& form_issues) {
|
||||
if (elements.size() == 0) {
|
||||
return;
|
||||
}
|
||||
@ -255,7 +254,7 @@ void AppendFormIssuesInternal(const WebVector<WebFormControlElement>& elements,
|
||||
// and returns a vector that is the union of `form_issues` and the new issues
|
||||
// found.
|
||||
std::vector<FormIssue> GetFormIssues(
|
||||
const blink::WebVector<blink::WebFormControlElement>& control_elements,
|
||||
const std::vector<blink::WebFormControlElement>& control_elements,
|
||||
std::vector<FormIssue> form_issues) {
|
||||
AppendFormIssuesInternal(control_elements, form_issues);
|
||||
return form_issues;
|
||||
@ -343,7 +342,7 @@ void MaybeEmitFormIssuesToDevtools(blink::WebLocalFrame& web_local_frame,
|
||||
}
|
||||
|
||||
std::vector<FormIssue> GetFormIssuesForTesting( // IN-TEST
|
||||
const blink::WebVector<blink::WebFormControlElement>& control_elements,
|
||||
const std::vector<blink::WebFormControlElement>& control_elements,
|
||||
std::vector<FormIssue> form_issues) {
|
||||
return GetFormIssues(control_elements, form_issues);
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "components/autofill/core/common/form_field_data.h"
|
||||
#include "third_party/blink/public/mojom/devtools/inspector_issue.mojom.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
class WebFormControlElement;
|
||||
@ -49,7 +48,7 @@ void MaybeEmitFormIssuesToDevtools(blink::WebLocalFrame& web_local_frame,
|
||||
base::span<const FormData> forms);
|
||||
|
||||
std::vector<FormIssue> GetFormIssuesForTesting(
|
||||
const blink::WebVector<blink::WebFormControlElement>& control_elements,
|
||||
const std::vector<blink::WebFormControlElement>& control_elements,
|
||||
std::vector<FormIssue> form_issues);
|
||||
|
||||
std::vector<FormIssue> CheckForLabelsWithIncorrectForAttributeForTesting(
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "third_party/blink/public/platform/url_conversion.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_autofill_state.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
@ -82,7 +81,6 @@ using blink::WebNode;
|
||||
using blink::WebOptionElement;
|
||||
using blink::WebSelectElement;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace autofill::form_util {
|
||||
|
||||
@ -1765,7 +1763,7 @@ uint64_t GetMaxLength(const WebFormControlElement& element) {
|
||||
// For more details, see the documentation of `SelectOption`.
|
||||
std::vector<SelectOption> GetSelectOptions(
|
||||
const WebSelectElement& select_element) {
|
||||
WebVector<WebElement> option_elements = select_element.GetListItems();
|
||||
std::vector<WebElement> option_elements = select_element.GetListItems();
|
||||
|
||||
// Constrain the maximum list length to prevent a malicious site from DOS'ing
|
||||
// the browser, without entirely breaking autocomplete for some extreme
|
||||
@ -1811,7 +1809,7 @@ std::vector<SelectOption> GetDataListOptions(const WebInputElement& element) {
|
||||
auto to_string = [](WebString s) {
|
||||
return s.Utf16().substr(0, kMaxStringLength);
|
||||
};
|
||||
WebVector<WebOptionElement> option_elements =
|
||||
std::vector<WebOptionElement> option_elements =
|
||||
element.FilteredDataListOptions();
|
||||
std::vector<SelectOption> options;
|
||||
options.reserve(std::min(option_elements.size(), kMaxListSize));
|
||||
@ -2852,14 +2850,14 @@ std::string ExtractFinalCheckoutAmountFromDom(
|
||||
std::string_view price_regex,
|
||||
std::string_view label_regex,
|
||||
size_t number_of_ancestor_levels_to_search) {
|
||||
WebVector<WebNode> price_nodes =
|
||||
std::vector<WebNode> price_nodes =
|
||||
document.FindAllTextNodesMatchingRegex(WebString::FromUTF8(price_regex));
|
||||
|
||||
if (price_nodes.empty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
WebVector<WebNode> label_nodes =
|
||||
std::vector<WebNode> label_nodes =
|
||||
document.FindAllTextNodesMatchingRegex(WebString::FromUTF8(label_regex));
|
||||
|
||||
if (label_nodes.empty()) {
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "components/autofill/core/common/form_field_data.h"
|
||||
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
|
||||
#include "components/autofill/core/common/unique_ids.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_autofill_state.h"
|
||||
#include "third_party/blink/public/web/web_element_collection.h"
|
||||
#include "third_party/blink/public/web/web_form_control_element.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/autofill/content/renderer/form_autofill_util.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/feature_list.h"
|
||||
#include "base/metrics/field_trial.h"
|
||||
#include "base/strings/strcat.h"
|
||||
@ -29,7 +31,6 @@
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_element_collection.h"
|
||||
@ -54,7 +55,6 @@ using ::blink::WebInputElement;
|
||||
using ::blink::WebLocalFrame;
|
||||
using ::blink::WebNode;
|
||||
using ::blink::WebString;
|
||||
using ::blink::WebVector;
|
||||
using ::testing::_;
|
||||
using ::testing::AllOf;
|
||||
using ::testing::ElementsAre;
|
||||
@ -433,7 +433,7 @@ TEST_F(FormAutofillUtilsTest, FindChildTextSkipElementTest) {
|
||||
SCOPED_TRACE(test_case.description);
|
||||
LoadHTML(test_case.html);
|
||||
WebElement target = GetElementById(GetDocument(), "target");
|
||||
WebVector<WebElement> web_to_skip =
|
||||
std::vector<WebElement> web_to_skip =
|
||||
GetDocument().QuerySelectorAll("div[class='skip']");
|
||||
std::set<WebNode> to_skip;
|
||||
for (const WebElement& element : web_to_skip) {
|
||||
@ -703,7 +703,7 @@ TEST_F(FormAutofillUtilsTest, IsFocusable) {
|
||||
|
||||
TEST_F(FormAutofillUtilsTest, FindFormByUniqueId) {
|
||||
LoadHTML("<body><form id='form1'></form><form id='form2'></form></body>");
|
||||
WebVector<WebFormElement> forms = GetDocument().Forms();
|
||||
std::vector<WebFormElement> forms = GetDocument().Forms();
|
||||
|
||||
for (const auto& form : forms)
|
||||
EXPECT_EQ(form, GetFormByRendererId(GetFormRendererId(form)));
|
||||
|
@ -37,7 +37,6 @@ using blink::WebLabelElement;
|
||||
using blink::WebLocalFrame;
|
||||
using blink::WebNode;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace autofill {
|
||||
|
||||
|
@ -64,7 +64,6 @@
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
#include "third_party/blink/public/platform/web_security_origin.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_autofill_client.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
@ -92,7 +91,6 @@ using blink::WebNode;
|
||||
using blink::WebSecurityOrigin;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
using blink::WebVector;
|
||||
using blink::WebView;
|
||||
|
||||
using password_manager::util::IsRendererRecognizedCredentialForm;
|
||||
@ -1409,7 +1407,7 @@ void PasswordAutofillAgent::UserGestureObserved() {
|
||||
}
|
||||
|
||||
void PasswordAutofillAgent::AnnotateFormsAndFieldsWithSignatures(
|
||||
WebVector<WebFormElement>& forms,
|
||||
std::vector<WebFormElement>& forms,
|
||||
const SynchronousFormCache& form_cache) {
|
||||
if (!render_frame()) {
|
||||
return;
|
||||
@ -1482,7 +1480,7 @@ void PasswordAutofillAgent::SendPasswordForms(
|
||||
return;
|
||||
}
|
||||
|
||||
WebVector<WebFormElement> forms = doc.GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = doc.GetTopLevelForms();
|
||||
|
||||
if (IsShowAutofillSignaturesEnabled())
|
||||
AnnotateFormsAndFieldsWithSignatures(forms, form_cache);
|
||||
|
@ -431,7 +431,7 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
|
||||
// signatures as HTML attributes. Used by
|
||||
// chrome://flags/#enable-show-autofill-signatures only.
|
||||
void AnnotateFormsAndFieldsWithSignatures(
|
||||
blink::WebVector<blink::WebFormElement>& forms,
|
||||
std::vector<blink::WebFormElement>& forms,
|
||||
const SynchronousFormCache& form_cache);
|
||||
|
||||
// Scans the given frame for password forms and sends them up to the browser.
|
||||
|
@ -2,22 +2,23 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "components/autofill/content/renderer/password_form_conversion_utils.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "components/autofill/content/renderer/password_form_conversion_utils.h"
|
||||
#include "content/public/test/render_view_test.h"
|
||||
#include "google_apis/gaia/gaia_urls.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_form_element.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
|
||||
using blink::WebFormElement;
|
||||
using blink::WebLocalFrame;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace autofill {
|
||||
namespace {
|
||||
@ -114,7 +115,7 @@ class PasswordFormConversionUtilsTest : public content::RenderViewTest {
|
||||
WebLocalFrame* frame = GetMainFrame();
|
||||
ASSERT_TRUE(frame);
|
||||
|
||||
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
|
||||
ASSERT_LE(1U, forms.size());
|
||||
|
||||
*form = forms[0];
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/check_op.h"
|
||||
@ -29,7 +30,6 @@
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/platform/web_security_origin.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_form_control_element.h"
|
||||
#include "third_party/blink/public/web/web_form_element.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/cast_receiver/renderer/wrapping_url_loader_throttle_provider.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "components/cast_receiver/renderer/url_rewrite_rules_provider.h"
|
||||
#include "components/media_control/renderer/media_playback_options.h"
|
||||
#include "components/on_load_script_injector/renderer/on_load_script_injector.h"
|
||||
@ -11,7 +13,6 @@
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
#include "third_party/blink/public/platform/url_loader_throttle_provider.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace cast_receiver {
|
||||
|
||||
@ -39,13 +40,13 @@ WrappingURLLoaderThrottleProvider::Clone() {
|
||||
wrapped_provider_ ? wrapped_provider_->Clone() : nullptr, *client_);
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
WrappingURLLoaderThrottleProvider::CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
if (wrapped_provider_) {
|
||||
throttles = wrapped_provider_->CreateThrottles(local_frame_token, request);
|
||||
}
|
||||
|
@ -7,12 +7,12 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/flat_map.h"
|
||||
#include "base/functional/callback_forward.h"
|
||||
#include "base/sequence_checker.h"
|
||||
#include "third_party/blink/public/platform/url_loader_throttle_provider.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace network {
|
||||
struct ResourceRequest;
|
||||
@ -57,7 +57,7 @@ class WrappingURLLoaderThrottleProvider
|
||||
|
||||
// blink::URLLoaderThrottleProvider implementation.
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override;
|
||||
void SetOnline(bool is_online) override;
|
||||
|
@ -43,11 +43,11 @@ class ContentCaptureSender : public content::RenderFrameObserver,
|
||||
|
||||
// blink::WebContentCaptureClient:
|
||||
base::TimeDelta GetTaskInitialDelay() const override;
|
||||
void DidCaptureContent(const blink::WebVector<blink::WebContentHolder>& data,
|
||||
void DidCaptureContent(const std::vector<blink::WebContentHolder>& data,
|
||||
bool first_data) override;
|
||||
void DidUpdateContent(
|
||||
const blink::WebVector<blink::WebContentHolder>& data) override;
|
||||
void DidRemoveContent(blink::WebVector<int64_t> data) override;
|
||||
const std::vector<blink::WebContentHolder>& data) override;
|
||||
void DidRemoveContent(std::vector<int64_t> data) override;
|
||||
|
||||
// mojom::ContentCaptureSender:
|
||||
void StartCapture() override;
|
||||
@ -58,7 +58,7 @@ class ContentCaptureSender : public content::RenderFrameObserver,
|
||||
|
||||
private:
|
||||
void FillContentCaptureData(
|
||||
const blink::WebVector<blink::WebContentHolder>& node_holders,
|
||||
const std::vector<blink::WebContentHolder>& node_holders,
|
||||
ContentCaptureData* data,
|
||||
bool set_url);
|
||||
const mojo::AssociatedRemote<mojom::ContentCaptureReceiver>&
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/values.h"
|
||||
@ -21,7 +22,6 @@
|
||||
#include "third_party/blink/public/platform/web_security_origin.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_associated_url_loader.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_dom_message_event.h"
|
||||
@ -137,8 +137,7 @@ void PdfViewWebPluginClient::ReportFindInPageTickmarks(
|
||||
const std::vector<gfx::Rect>& tickmarks) {
|
||||
blink::WebLocalFrame* frame = GetFrame();
|
||||
if (frame) {
|
||||
frame->SetTickmarks(blink::WebElement(),
|
||||
blink::WebVector<gfx::Rect>(tickmarks));
|
||||
frame->SetTickmarks(blink::WebElement(), std::vector<gfx::Rect>(tickmarks));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,6 @@ using blink::WebPluginContainer;
|
||||
using blink::WebString;
|
||||
using blink::WebURLError;
|
||||
using blink::WebURLResponse;
|
||||
using blink::WebVector;
|
||||
using blink::WebView;
|
||||
using blink::web_pref::WebPreferences;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/path_service.h"
|
||||
@ -28,7 +29,6 @@
|
||||
#include "components/spellcheck/renderer/spellcheck_provider_test.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_result.h"
|
||||
|
||||
namespace {
|
||||
@ -109,7 +109,7 @@ class MultilingualSpellCheckTest : public testing::Test {
|
||||
void ExpectSpellCheckParagraphResults(
|
||||
const std::u16string& input,
|
||||
const std::vector<SpellCheckResult>& expected) {
|
||||
blink::WebVector<blink::WebTextCheckingResult> results;
|
||||
std::vector<blink::WebTextCheckingResult> results;
|
||||
spellcheck_->SpellCheckParagraph(input, provider_->GetSpellCheckHost(),
|
||||
&results);
|
||||
|
||||
@ -247,7 +247,7 @@ TEST_F(MultilingualSpellCheckTest, MultilingualSpellCheckSuggestions) {
|
||||
});
|
||||
|
||||
for (size_t i = 0; i < std::size(kTestCases); ++i) {
|
||||
blink::WebVector<blink::WebString> suggestions;
|
||||
std::vector<blink::WebString> suggestions;
|
||||
size_t misspelling_start;
|
||||
size_t misspelling_length;
|
||||
static_cast<blink::WebTextCheckClient*>(provider())
|
||||
|
@ -113,7 +113,7 @@ class SpellCheckProvider : public content::RenderFrameObserver,
|
||||
const blink::WebString& text,
|
||||
size_t& offset,
|
||||
size_t& length,
|
||||
blink::WebVector<blink::WebString>* optional_suggestions) override;
|
||||
std::vector<blink::WebString>* optional_suggestions) override;
|
||||
void RequestCheckingOfText(
|
||||
const blink::WebString& text,
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completion) override;
|
||||
@ -158,7 +158,7 @@ class SpellCheckProvider : public content::RenderFrameObserver,
|
||||
// The last text sent to the browser process for spellchecking, and its
|
||||
// spellcheck results and WebTextCheckCompletions identifier.
|
||||
std::u16string last_request_;
|
||||
blink::WebVector<blink::WebTextCheckingResult> last_results_;
|
||||
std::vector<blink::WebTextCheckingResult> last_results_;
|
||||
int last_identifier_;
|
||||
|
||||
// Weak pointer to shared (per renderer) spellcheck data.
|
||||
|
@ -47,7 +47,7 @@ FakeTextCheckingCompletion::FakeTextCheckingCompletion(
|
||||
FakeTextCheckingCompletion::~FakeTextCheckingCompletion() = default;
|
||||
|
||||
void FakeTextCheckingCompletion::DidFinishCheckingText(
|
||||
const blink::WebVector<blink::WebTextCheckingResult>& results) {
|
||||
const std::vector<blink::WebTextCheckingResult>& results) {
|
||||
++result_->completion_count_;
|
||||
result_->results_ = results;
|
||||
}
|
||||
@ -208,7 +208,7 @@ void TestingSpellCheckProvider::DisconnectSessionBridge() {
|
||||
|
||||
void TestingSpellCheckProvider::SetLastResults(
|
||||
const std::u16string last_request,
|
||||
blink::WebVector<blink::WebTextCheckingResult>& last_results) {
|
||||
std::vector<blink::WebTextCheckingResult>& last_results) {
|
||||
last_request_ = last_request;
|
||||
last_results_ = last_results;
|
||||
}
|
||||
|
@ -18,14 +18,13 @@
|
||||
#include "components/spellcheck/spellcheck_buildflags.h"
|
||||
#include "mojo/public/cpp/bindings/receiver.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_completion.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_result.h"
|
||||
|
||||
struct FakeTextCheckingResult {
|
||||
size_t completion_count_ = 0;
|
||||
size_t cancellation_count_ = 0;
|
||||
blink::WebVector<blink::WebTextCheckingResult> results_;
|
||||
std::vector<blink::WebTextCheckingResult> results_;
|
||||
|
||||
explicit FakeTextCheckingResult();
|
||||
~FakeTextCheckingResult();
|
||||
@ -38,7 +37,7 @@ class FakeTextCheckingCompletion : public blink::WebTextCheckingCompletion {
|
||||
~FakeTextCheckingCompletion() override;
|
||||
|
||||
void DidFinishCheckingText(
|
||||
const blink::WebVector<blink::WebTextCheckingResult>& results) override;
|
||||
const std::vector<blink::WebTextCheckingResult>& results) override;
|
||||
void DidCancelCheckingText() override;
|
||||
|
||||
raw_ptr<FakeTextCheckingResult> result_;
|
||||
@ -87,9 +86,8 @@ class TestingSpellCheckProvider : public SpellCheckProvider,
|
||||
const std::u16string& text,
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completion);
|
||||
|
||||
void SetLastResults(
|
||||
const std::u16string last_request,
|
||||
blink::WebVector<blink::WebTextCheckingResult>& last_results);
|
||||
void SetLastResults(const std::u16string last_request,
|
||||
std::vector<blink::WebTextCheckingResult>& last_results);
|
||||
bool SatisfyRequestFromCache(const std::u16string& text,
|
||||
blink::WebTextCheckingCompletion* completion);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/files/file_path.h"
|
||||
@ -27,7 +28,6 @@
|
||||
#include "components/spellcheck/renderer/spellcheck_language.h"
|
||||
#include "components/spellcheck/renderer/spellcheck_provider_test.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_completion.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_result.h"
|
||||
|
||||
@ -114,7 +114,7 @@ class SpellCheckTest : public testing::Test {
|
||||
protected:
|
||||
void TestSpellCheckParagraph(const std::u16string& input,
|
||||
const std::vector<SpellCheckResult>& expected) {
|
||||
blink::WebVector<blink::WebTextCheckingResult> results;
|
||||
std::vector<blink::WebTextCheckingResult> results;
|
||||
spell_check()->SpellCheckParagraph(input, provider_.GetSpellCheckHost(),
|
||||
&results);
|
||||
|
||||
@ -139,7 +139,7 @@ class SpellCheckTest : public testing::Test {
|
||||
|
||||
struct MockTextCheckingResult {
|
||||
size_t completion_count_ = 0;
|
||||
blink::WebVector<blink::WebTextCheckingResult> last_results_;
|
||||
std::vector<blink::WebTextCheckingResult> last_results_;
|
||||
};
|
||||
|
||||
// A fake completion object for verification.
|
||||
@ -149,7 +149,7 @@ class MockTextCheckingCompletion : public blink::WebTextCheckingCompletion {
|
||||
: result_(result) {}
|
||||
|
||||
void DidFinishCheckingText(
|
||||
const blink::WebVector<blink::WebTextCheckingResult>& results) override {
|
||||
const std::vector<blink::WebTextCheckingResult>& results) override {
|
||||
result_->completion_count_++;
|
||||
result_->last_results_ = results;
|
||||
}
|
||||
@ -1256,7 +1256,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResultsKeepsMarkers) {
|
||||
std::vector<SpellCheckResult> spellcheck_results;
|
||||
spellcheck_results.push_back(
|
||||
SpellCheckResult(SpellCheckResult::SPELLING, 0, 2, std::u16string()));
|
||||
blink::WebVector<blink::WebTextCheckingResult> textcheck_results;
|
||||
std::vector<blink::WebTextCheckingResult> textcheck_results;
|
||||
spell_check()->CreateTextCheckingResults(
|
||||
SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0,
|
||||
text, spellcheck_results, &textcheck_results);
|
||||
@ -1274,7 +1274,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResultsAddsGrammarMarkers) {
|
||||
std::vector<SpellCheckResult> spellcheck_results;
|
||||
spellcheck_results.push_back(
|
||||
SpellCheckResult(SpellCheckResult::SPELLING, 7, 4, std::u16string()));
|
||||
blink::WebVector<blink::WebTextCheckingResult> textcheck_results;
|
||||
std::vector<blink::WebTextCheckingResult> textcheck_results;
|
||||
spell_check()->CreateTextCheckingResults(
|
||||
SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0,
|
||||
text, spellcheck_results, &textcheck_results);
|
||||
@ -1348,7 +1348,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResultsKeepsTypographicalApostrophe) {
|
||||
SpellCheckResult(SpellCheckResult::SPELLING, 6, 6,
|
||||
std::vector<std::u16string>({u"have", u"haven't"})));
|
||||
|
||||
blink::WebVector<blink::WebTextCheckingResult> textcheck_results;
|
||||
std::vector<blink::WebTextCheckingResult> textcheck_results;
|
||||
spell_check()->CreateTextCheckingResults(
|
||||
SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0,
|
||||
text, spellcheck_results, &textcheck_results);
|
||||
|
@ -52,7 +52,6 @@ using blink::WebLanguageDetectionDetails;
|
||||
using blink::WebLocalFrame;
|
||||
using blink::WebScriptSource;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -41,7 +41,7 @@ void AddInstallIcon(const WebElement& link,
|
||||
|
||||
mojom::WebPageIconInfoPtr icon_info(mojom::WebPageIconInfo::New());
|
||||
if (link.HasAttribute("sizes")) {
|
||||
blink::WebVector<gfx::Size> icon_sizes =
|
||||
std::vector<gfx::Size> icon_sizes =
|
||||
blink::WebIconSizesParser::ParseIconSizes(link.GetAttribute("sizes"));
|
||||
if (icon_sizes.size() == 1 && icon_sizes[0].width() != 0 &&
|
||||
icon_sizes[0].height() == icon_sizes[0].width()) {
|
||||
|
@ -314,7 +314,7 @@ Status DeriveKey(const blink::WebCryptoAlgorithm& algorithm,
|
||||
}
|
||||
|
||||
bool SerializeKeyForClone(const blink::WebCryptoKey& key,
|
||||
blink::WebVector<uint8_t>* key_data) {
|
||||
std::vector<uint8_t>* key_data) {
|
||||
const AlgorithmImplementation* impl = nullptr;
|
||||
Status status = GetAlgorithmImplementation(key.Algorithm().Id(), &impl);
|
||||
if (status.IsError())
|
||||
|
@ -115,7 +115,7 @@ Status DeriveKey(const blink::WebCryptoAlgorithm& algorithm,
|
||||
blink::WebCryptoKey* derived_key);
|
||||
|
||||
bool SerializeKeyForClone(const blink::WebCryptoKey& key,
|
||||
blink::WebVector<uint8_t>* key_data);
|
||||
std::vector<uint8_t>* key_data);
|
||||
|
||||
bool DeserializeKeyForClone(const blink::WebCryptoKeyAlgorithm& algorithm,
|
||||
blink::WebCryptoKeyType type,
|
||||
|
@ -93,7 +93,7 @@ Status AlgorithmImplementation::ExportKey(blink::WebCryptoKeyFormat format,
|
||||
|
||||
Status AlgorithmImplementation::SerializeKeyForClone(
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<uint8_t>* key_data) const {
|
||||
std::vector<uint8_t>* key_data) const {
|
||||
switch (key.GetType()) {
|
||||
case blink::kWebCryptoKeyTypeSecret:
|
||||
*key_data = GetSymmetricKeyData(key);
|
||||
|
@ -161,7 +161,7 @@ class AlgorithmImplementation {
|
||||
// Note that SerializeKeyForClone() is not virtual because all
|
||||
// implementations end up doing the same thing.
|
||||
Status SerializeKeyForClone(const blink::WebCryptoKey& key,
|
||||
blink::WebVector<uint8_t>* key_data) const;
|
||||
std::vector<uint8_t>* key_data) const;
|
||||
|
||||
// Deserializes key data from Blink (used for structured cloning).
|
||||
//
|
||||
|
@ -61,7 +61,7 @@ Status CommonEncryptDecrypt(InitFunc init_func,
|
||||
return Status::OperationError();
|
||||
}
|
||||
|
||||
const blink::WebVector<uint8_t>& label =
|
||||
const std::vector<uint8_t>& label =
|
||||
algorithm.RsaOaepParams()->OptionalLabel();
|
||||
|
||||
if (label.size()) {
|
||||
|
@ -178,7 +178,7 @@ struct BaseState {
|
||||
struct EncryptState : public BaseState {
|
||||
EncryptState(const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
const blink::WebCryptoResult& result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
|
||||
: BaseState(result, std::move(task_runner)),
|
||||
@ -188,7 +188,7 @@ struct EncryptState : public BaseState {
|
||||
|
||||
const blink::WebCryptoAlgorithm algorithm;
|
||||
const blink::WebCryptoKey key;
|
||||
const blink::WebVector<unsigned char> data;
|
||||
const std::vector<unsigned char> data;
|
||||
|
||||
std::vector<uint8_t> buffer;
|
||||
};
|
||||
@ -216,7 +216,7 @@ struct GenerateKeyState : public BaseState {
|
||||
|
||||
struct ImportKeyState : public BaseState {
|
||||
ImportKeyState(blink::WebCryptoKeyFormat format,
|
||||
blink::WebVector<unsigned char> key_data,
|
||||
std::vector<unsigned char> key_data,
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
bool extractable,
|
||||
blink::WebCryptoKeyUsageMask usages,
|
||||
@ -230,7 +230,7 @@ struct ImportKeyState : public BaseState {
|
||||
usages(usages) {}
|
||||
|
||||
const blink::WebCryptoKeyFormat format;
|
||||
const blink::WebVector<unsigned char> key_data;
|
||||
const std::vector<unsigned char> key_data;
|
||||
const blink::WebCryptoAlgorithm algorithm;
|
||||
const bool extractable;
|
||||
const blink::WebCryptoKeyUsageMask usages;
|
||||
@ -256,8 +256,8 @@ typedef EncryptState SignState;
|
||||
struct VerifySignatureState : public BaseState {
|
||||
VerifySignatureState(const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> signature,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> signature,
|
||||
std::vector<unsigned char> data,
|
||||
const blink::WebCryptoResult& result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
|
||||
: BaseState(result, std::move(task_runner)),
|
||||
@ -269,8 +269,8 @@ struct VerifySignatureState : public BaseState {
|
||||
|
||||
const blink::WebCryptoAlgorithm algorithm;
|
||||
const blink::WebCryptoKey key;
|
||||
blink::WebVector<unsigned char> signature;
|
||||
blink::WebVector<unsigned char> data;
|
||||
std::vector<unsigned char> signature;
|
||||
std::vector<unsigned char> data;
|
||||
|
||||
bool verify_result;
|
||||
};
|
||||
@ -298,7 +298,7 @@ struct WrapKeyState : public BaseState {
|
||||
|
||||
struct UnwrapKeyState : public BaseState {
|
||||
UnwrapKeyState(blink::WebCryptoKeyFormat format,
|
||||
blink::WebVector<unsigned char> wrapped_key,
|
||||
std::vector<unsigned char> wrapped_key,
|
||||
const blink::WebCryptoKey& wrapping_key,
|
||||
const blink::WebCryptoAlgorithm& unwrap_algorithm,
|
||||
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
|
||||
@ -316,7 +316,7 @@ struct UnwrapKeyState : public BaseState {
|
||||
usages(usages) {}
|
||||
|
||||
const blink::WebCryptoKeyFormat format;
|
||||
blink::WebVector<unsigned char> wrapped_key;
|
||||
std::vector<unsigned char> wrapped_key;
|
||||
const blink::WebCryptoKey wrapping_key;
|
||||
const blink::WebCryptoAlgorithm unwrap_algorithm;
|
||||
const blink::WebCryptoAlgorithm unwrapped_key_algorithm;
|
||||
@ -632,7 +632,7 @@ WebCryptoImpl::~WebCryptoImpl() {
|
||||
void WebCryptoImpl::Encrypt(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
DCHECK(!algorithm.IsNull());
|
||||
@ -650,7 +650,7 @@ void WebCryptoImpl::Encrypt(
|
||||
void WebCryptoImpl::Decrypt(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
DCHECK(!algorithm.IsNull());
|
||||
@ -667,7 +667,7 @@ void WebCryptoImpl::Decrypt(
|
||||
|
||||
void WebCryptoImpl::Digest(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
DCHECK(!algorithm.IsNull());
|
||||
@ -703,7 +703,7 @@ void WebCryptoImpl::GenerateKey(
|
||||
|
||||
void WebCryptoImpl::ImportKey(
|
||||
blink::WebCryptoKeyFormat format,
|
||||
blink::WebVector<unsigned char> key_data,
|
||||
std::vector<unsigned char> key_data,
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
bool extractable,
|
||||
blink::WebCryptoKeyUsageMask usages,
|
||||
@ -738,7 +738,7 @@ void WebCryptoImpl::ExportKey(
|
||||
void WebCryptoImpl::Sign(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
if (result.Cancelled())
|
||||
@ -754,8 +754,8 @@ void WebCryptoImpl::Sign(
|
||||
void WebCryptoImpl::VerifySignature(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> signature,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> signature,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
if (result.Cancelled())
|
||||
@ -789,7 +789,7 @@ void WebCryptoImpl::WrapKey(
|
||||
|
||||
void WebCryptoImpl::UnwrapKey(
|
||||
blink::WebCryptoKeyFormat format,
|
||||
blink::WebVector<unsigned char> wrapped_key,
|
||||
std::vector<unsigned char> wrapped_key,
|
||||
const blink::WebCryptoKey& wrapping_key,
|
||||
const blink::WebCryptoAlgorithm& unwrap_algorithm,
|
||||
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
|
||||
@ -856,9 +856,8 @@ bool WebCryptoImpl::DeserializeKeyForClone(
|
||||
key_data, &key);
|
||||
}
|
||||
|
||||
bool WebCryptoImpl::SerializeKeyForClone(
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char>& key_data) {
|
||||
bool WebCryptoImpl::SerializeKeyForClone(const blink::WebCryptoKey& key,
|
||||
std::vector<unsigned char>& key_data) {
|
||||
return webcrypto::SerializeKeyForClone(key, &key_data);
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,12 @@
|
||||
#ifndef COMPONENTS_WEBCRYPTO_WEBCRYPTO_IMPL_H_
|
||||
#define COMPONENTS_WEBCRYPTO_WEBCRYPTO_IMPL_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "third_party/blink/public/platform/web_crypto.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_algorithm.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace webcrypto {
|
||||
|
||||
@ -31,17 +32,17 @@ class WebCryptoImpl : public blink::WebCrypto {
|
||||
void Encrypt(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void Decrypt(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void Digest(const blink::WebCryptoAlgorithm& algorithm,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void GenerateKey(
|
||||
@ -52,7 +53,7 @@ class WebCryptoImpl : public blink::WebCrypto {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void ImportKey(
|
||||
blink::WebCryptoKeyFormat format,
|
||||
blink::WebVector<unsigned char> key_data,
|
||||
std::vector<unsigned char> key_data,
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
bool extractable,
|
||||
blink::WebCryptoKeyUsageMask usages,
|
||||
@ -65,14 +66,14 @@ class WebCryptoImpl : public blink::WebCrypto {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void Sign(const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void VerifySignature(
|
||||
const blink::WebCryptoAlgorithm& algorithm,
|
||||
const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char> signature,
|
||||
blink::WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> signature,
|
||||
std::vector<unsigned char> data,
|
||||
blink::WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void WrapKey(
|
||||
@ -84,7 +85,7 @@ class WebCryptoImpl : public blink::WebCrypto {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
|
||||
void UnwrapKey(
|
||||
blink::WebCryptoKeyFormat format,
|
||||
blink::WebVector<unsigned char> wrapped_key,
|
||||
std::vector<unsigned char> wrapped_key,
|
||||
const blink::WebCryptoKey& wrapping_key,
|
||||
const blink::WebCryptoAlgorithm& unwrap_algorithm,
|
||||
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
|
||||
@ -118,7 +119,7 @@ class WebCryptoImpl : public blink::WebCrypto {
|
||||
blink::WebCryptoKey& key) override;
|
||||
|
||||
bool SerializeKeyForClone(const blink::WebCryptoKey& key,
|
||||
blink::WebVector<unsigned char>& key_data) override;
|
||||
std::vector<unsigned char>& key_data) override;
|
||||
};
|
||||
|
||||
} // namespace webcrypto
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
@ -16,7 +17,6 @@
|
||||
#include "components/services/font/public/mojom/font_service.mojom.h"
|
||||
#include "third_party/blink/public/platform/web_font_render_style.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "ui/gfx/font_fallback_linux.h"
|
||||
|
||||
namespace content {
|
||||
|
@ -64,14 +64,14 @@ WebSandboxSupportWin::DigitsAndSigns(LCID lcid, bool force_defaults) {
|
||||
return init_data;
|
||||
}
|
||||
|
||||
blink::WebVector<blink::WebString> WebSandboxSupportWin::LocaleStrings(
|
||||
std::vector<blink::WebString> WebSandboxSupportWin::LocaleStrings(
|
||||
LCID lcid,
|
||||
bool force_defaults,
|
||||
mojom::SandboxSupport::LcTypeStrings collection) {
|
||||
std::vector<std::u16string> results;
|
||||
CHECK(sandbox_support_->LocaleStrings(lcid, force_defaults, collection,
|
||||
&results));
|
||||
blink::WebVector<blink::WebString> ret;
|
||||
std::vector<blink::WebString> ret;
|
||||
ret.reserve(results.size());
|
||||
for (const auto& str : results) {
|
||||
ret.push_back(blink::WebString(str));
|
||||
@ -79,28 +79,28 @@ blink::WebVector<blink::WebString> WebSandboxSupportWin::LocaleStrings(
|
||||
return ret;
|
||||
}
|
||||
|
||||
blink::WebVector<blink::WebString> WebSandboxSupportWin::MonthLabels(
|
||||
std::vector<blink::WebString> WebSandboxSupportWin::MonthLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) {
|
||||
return LocaleStrings(lcid, force_defaults,
|
||||
mojom::SandboxSupport::LcTypeStrings::kMonths);
|
||||
}
|
||||
|
||||
blink::WebVector<blink::WebString> WebSandboxSupportWin::WeekDayShortLabels(
|
||||
std::vector<blink::WebString> WebSandboxSupportWin::WeekDayShortLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) {
|
||||
return LocaleStrings(lcid, force_defaults,
|
||||
mojom::SandboxSupport::LcTypeStrings::kShortWeekDays);
|
||||
}
|
||||
|
||||
blink::WebVector<blink::WebString> WebSandboxSupportWin::ShortMonthLabels(
|
||||
std::vector<blink::WebString> WebSandboxSupportWin::ShortMonthLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) {
|
||||
return LocaleStrings(lcid, force_defaults,
|
||||
mojom::SandboxSupport::LcTypeStrings::kShortMonths);
|
||||
}
|
||||
|
||||
blink::WebVector<blink::WebString> WebSandboxSupportWin::AmPmLabels(
|
||||
std::vector<blink::WebString> WebSandboxSupportWin::AmPmLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) {
|
||||
return LocaleStrings(lcid, force_defaults,
|
||||
|
@ -34,22 +34,21 @@ class WebSandboxSupportWin : public blink::WebSandboxSupport {
|
||||
LCID lcid,
|
||||
bool force_defaults) override;
|
||||
|
||||
blink::WebVector<blink::WebString> MonthLabels(LCID lcid,
|
||||
std::vector<blink::WebString> MonthLabels(LCID lcid,
|
||||
bool force_defaults) override;
|
||||
std::vector<blink::WebString> WeekDayShortLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) override;
|
||||
std::vector<blink::WebString> ShortMonthLabels(LCID lcid,
|
||||
bool force_defaults) override;
|
||||
blink::WebVector<blink::WebString> WeekDayShortLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) override;
|
||||
blink::WebVector<blink::WebString> ShortMonthLabels(
|
||||
LCID lcid,
|
||||
bool force_defaults) override;
|
||||
blink::WebVector<blink::WebString> AmPmLabels(LCID lcid,
|
||||
bool force_defaults) override;
|
||||
std::vector<blink::WebString> AmPmLabels(LCID lcid,
|
||||
bool force_defaults) override;
|
||||
blink::WebString LocaleString(LCID lcid,
|
||||
LCTYPE type,
|
||||
bool force_defaults) override;
|
||||
|
||||
private:
|
||||
blink::WebVector<blink::WebString> LocaleStrings(
|
||||
std::vector<blink::WebString> LocaleStrings(
|
||||
LCID lcid,
|
||||
bool force_defaults,
|
||||
mojom::SandboxSupport::LcTypeStrings collection);
|
||||
|
@ -326,7 +326,7 @@ ContentRendererClient::GetAudioRendererAlgorithmParameters(
|
||||
|
||||
void ContentRendererClient::AppendContentSecurityPolicy(
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {}
|
||||
std::vector<blink::WebContentSecurityPolicyHeader>* csp) {}
|
||||
|
||||
std::unique_ptr<media::RendererFactory>
|
||||
ContentRendererClient::GetBaseRendererFactory(
|
||||
|
@ -455,7 +455,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// `url`. This allows the embedder to customize the applied CSP.
|
||||
virtual void AppendContentSecurityPolicy(
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp);
|
||||
std::vector<blink::WebContentSecurityPolicyHeader>* csp);
|
||||
|
||||
// Returns a RendererFactory to use as the "base" for a
|
||||
// RendererFactorySelector. Returns `nullptr` to get the default behaviour.
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/read_only_shared_memory_region.h"
|
||||
@ -29,7 +30,6 @@
|
||||
#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
|
||||
#include "third_party/blink/public/mojom/frame/lifecycle.mojom.h"
|
||||
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_meaningful_layout.h"
|
||||
#include "third_party/blink/public/web/web_navigation_type.h"
|
||||
#include "ui/accessibility/ax_mode.h"
|
||||
@ -155,8 +155,8 @@ class CONTENT_EXPORT RenderFrameObserver
|
||||
virtual void DidChangeScrollOffset() {}
|
||||
virtual void WillSubmitForm(const blink::WebFormElement& form) {}
|
||||
virtual void DidMatchCSS(
|
||||
const blink::WebVector<blink::WebString>& newly_matching_selectors,
|
||||
const blink::WebVector<blink::WebString>& stopped_matching_selectors) {}
|
||||
const std::vector<blink::WebString>& newly_matching_selectors,
|
||||
const std::vector<blink::WebString>& stopped_matching_selectors) {}
|
||||
|
||||
// Called when the RenderFrame creates a FencedFrame and provides the
|
||||
// RemoteFrameToken to identify the `blink::RemoteFrame` to the inner
|
||||
|
@ -51,7 +51,6 @@ using blink::WebDocument;
|
||||
using blink::WebElement;
|
||||
using blink::WebNode;
|
||||
using blink::WebString;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace content {
|
||||
|
||||
@ -306,7 +305,7 @@ void AXImageAnnotator::AddImageAnnotationsForNode(WebAXObject& src,
|
||||
// Reject images that are explicitly empty, or that have a
|
||||
// meaningful name already.
|
||||
ax::mojom::NameFrom name_from;
|
||||
WebVector<WebAXObject> name_objects;
|
||||
std::vector<WebAXObject> name_objects;
|
||||
WebString web_name = src.GetName(name_from, name_objects);
|
||||
|
||||
// If an image has a nonempty name, compute whether we should add an
|
||||
@ -759,7 +758,7 @@ void AXImageAnnotator::OnImageAnnotated(
|
||||
// as a function of whether the retrieved image label was
|
||||
// a success, an error, or empty.
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
blink::WebString web_name = image.GetName(name_from, name_objects);
|
||||
int non_stop_length = GetLengthAfterRemovingStopwords(web_name.Utf8());
|
||||
|
||||
|
@ -5,10 +5,11 @@
|
||||
#ifndef CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_
|
||||
#define CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "content/common/content_export.h"
|
||||
#include "services/network/public/mojom/content_security_policy.mojom-forward.h"
|
||||
#include "third_party/blink/public/platform/web_content_security_policy_struct.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/containers/contains.h"
|
||||
@ -32,7 +34,6 @@
|
||||
#include "third_party/blink/public/platform/web_data.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/test/test_web_frame_content_dumper.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
@ -57,7 +58,6 @@ using blink::WebMetaElement;
|
||||
using blink::WebNode;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
using blink::WebVector;
|
||||
using blink::WebView;
|
||||
|
||||
namespace content {
|
||||
@ -91,7 +91,7 @@ class MAYBE_DomSerializerTests : public ContentBrowserTest,
|
||||
}
|
||||
|
||||
// DomSerializerDelegate.
|
||||
void DidSerializeDataForFrame(const WebVector<char>& data,
|
||||
void DidSerializeDataForFrame(const std::vector<char>& data,
|
||||
FrameSerializationStatus status) override {
|
||||
// Check finish status of current frame.
|
||||
ASSERT_FALSE(serialization_reported_end_of_data_);
|
||||
|
@ -31,7 +31,7 @@ std::optional<blink::InspectorPlayerError> ErrorFromParams(
|
||||
caused_by.push_back(*parsed_cause);
|
||||
}
|
||||
|
||||
blink::WebVector<blink::InspectorPlayerError::SourceLocation> stack_vec;
|
||||
std::vector<blink::InspectorPlayerError::SourceLocation> stack_vec;
|
||||
if (const auto* vec = param.FindList(media::StatusConstants::kStackKey)) {
|
||||
for (const auto& loc : *vec) {
|
||||
const auto& loc_dict = loc.GetDict();
|
||||
@ -47,7 +47,7 @@ std::optional<blink::InspectorPlayerError> ErrorFromParams(
|
||||
}
|
||||
}
|
||||
|
||||
blink::WebVector<blink::InspectorPlayerError::Data> data_vec;
|
||||
std::vector<blink::InspectorPlayerError::Data> data_vec;
|
||||
if (auto* data = param.FindDict(media::StatusConstants::kDataKey)) {
|
||||
for (const auto pair : *data) {
|
||||
std::string json;
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@ -21,7 +23,6 @@
|
||||
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
|
||||
#include "third_party/blink/public/platform/file_path_conversion.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -46,7 +46,6 @@ using blink::WebPluginParams;
|
||||
using blink::WebPrintParams;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -567,9 +567,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void FrameDetached(blink::DetachReason detach_reason) override;
|
||||
void DidChangeName(const blink::WebString& name) override;
|
||||
void DidMatchCSS(
|
||||
const blink::WebVector<blink::WebString>& newly_matching_selectors,
|
||||
const blink::WebVector<blink::WebString>& stopped_matching_selectors)
|
||||
override;
|
||||
const std::vector<blink::WebString>& newly_matching_selectors,
|
||||
const std::vector<blink::WebString>& stopped_matching_selectors) override;
|
||||
bool ShouldReportDetailedMessageForSourceAndSeverity(
|
||||
blink::mojom::ConsoleMessageLevel log_level,
|
||||
const blink::WebString& source) override;
|
||||
|
@ -915,7 +915,7 @@ void RenderThreadImpl::InitializeRenderer(
|
||||
user_agent_metadata_ = user_agent_metadata;
|
||||
cors_exempt_header_list_ = cors_exempt_header_list;
|
||||
|
||||
blink::WebVector<blink::WebString> web_cors_exempt_header_list(
|
||||
std::vector<blink::WebString> web_cors_exempt_header_list(
|
||||
cors_exempt_header_list.size());
|
||||
std::ranges::transform(
|
||||
cors_exempt_header_list, web_cors_exempt_header_list.begin(),
|
||||
|
@ -200,7 +200,7 @@ TEST_F(RenderWidgetTest, GetCompositionRangeValidComposition) {
|
||||
"<script> document.querySelector('div').focus(); </script>");
|
||||
gfx::Range range = LastCompositionRange();
|
||||
EXPECT_FALSE(range.IsValid());
|
||||
blink::WebVector<ui::ImeTextSpan> empty_ime_text_spans;
|
||||
std::vector<ui::ImeTextSpan> empty_ime_text_spans;
|
||||
DCHECK(GetInputMethodController());
|
||||
GetInputMethodController()->SetComposition("hello", empty_ime_text_spans,
|
||||
blink::WebRange(), 3, 3);
|
||||
|
@ -110,7 +110,6 @@
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_url_request.h"
|
||||
#include "third_party/blink/public/platform/web_v8_value_converter.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/modules/media/audio/audio_device_factory.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_media_inspector.h"
|
||||
@ -150,7 +149,6 @@ using blink::WebAudioSinkDescriptor;
|
||||
using blink::WebMediaStreamTrack;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
using blink::WebVector;
|
||||
|
||||
namespace content {
|
||||
|
||||
@ -1060,7 +1058,7 @@ bool RendererBlinkPlatformImpl::DisallowV8FeatureFlagOverrides() const {
|
||||
|
||||
void RendererBlinkPlatformImpl::AppendContentSecurityPolicy(
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {
|
||||
std::vector<blink::WebContentSecurityPolicyHeader>* csp) {
|
||||
GetContentClient()->renderer()->AppendContentSecurityPolicy(url, csp);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
bool DisallowV8FeatureFlagOverrides() const override;
|
||||
void AppendContentSecurityPolicy(
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override;
|
||||
std::vector<blink::WebContentSecurityPolicyHeader>* csp) override;
|
||||
bool IsFilePickerAllowedForCrossOriginSubframe(
|
||||
const blink::WebSecurityOrigin& origin) override;
|
||||
base::PlatformThreadId GetIOThreadId() const override;
|
||||
|
@ -181,10 +181,10 @@ class ShellContentRendererUrlLoaderThrottleProvider
|
||||
base::PassKey<ShellContentRendererUrlLoaderThrottleProvider>());
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override {
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
if (local_frame_token.has_value()) {
|
||||
auto throttle =
|
||||
content::MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating(
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/command_line.h"
|
||||
@ -50,7 +51,6 @@
|
||||
#include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
|
||||
#include "third_party/blink/public/platform/url_conversion.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_frame_widget.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
@ -85,7 +85,6 @@ using blink::WebString;
|
||||
using blink::WebTouchEvent;
|
||||
using blink::WebTouchPoint;
|
||||
using blink::WebURL;
|
||||
using blink::WebVector;
|
||||
using blink::WebView;
|
||||
|
||||
namespace content {
|
||||
@ -412,7 +411,7 @@ bool OutsideRadius(const gfx::PointF& a, const gfx::PointF& b, float radius) {
|
||||
(a.y() - b.y()) * (a.y() - b.y())) > radius * radius;
|
||||
}
|
||||
|
||||
void PopulateCustomItems(const WebVector<MenuItemInfo>& customItems,
|
||||
void PopulateCustomItems(const std::vector<MenuItemInfo>& customItems,
|
||||
const std::string& prefix,
|
||||
std::vector<std::string>* strings) {
|
||||
for (size_t i = 0; i < customItems.size(); ++i) {
|
||||
@ -475,7 +474,7 @@ std::vector<std::string> MakeMenuItemStringsFor(ContextMenuData* context_menu) {
|
||||
for (const char** item = kEditableMenuStrings; *item; ++item) {
|
||||
strings.push_back(*item);
|
||||
}
|
||||
WebVector<WebString> suggestions;
|
||||
std::vector<WebString> suggestions;
|
||||
WebTestSpellChecker::FillSuggestionList(
|
||||
WebString::FromUTF16(context_menu->misspelled_word), &suggestions);
|
||||
for (const WebString& suggestion : suggestions)
|
||||
@ -1875,7 +1874,7 @@ void EventSender::DumpFilenameBeingDragged(blink::WebLocalFrame* frame) {
|
||||
|
||||
auto* frame_proxy =
|
||||
static_cast<WebFrameTestProxy*>(RenderFrame::FromWebFrame(frame));
|
||||
WebVector<WebDragData::Item> items = current_drag_data_->Items();
|
||||
std::vector<WebDragData::Item> items = current_drag_data_->Items();
|
||||
for (const auto& item : items) {
|
||||
if (const auto* binary_data_item =
|
||||
absl::get_if<WebDragData::BinaryDataItem>(&item)) {
|
||||
@ -1940,7 +1939,7 @@ void EventSender::LeapForward(int milliseconds) {
|
||||
|
||||
void EventSender::BeginDragWithItems(
|
||||
blink::WebLocalFrame* frame,
|
||||
const WebVector<WebDragData::Item>& items) {
|
||||
const std::vector<WebDragData::Item>& items) {
|
||||
if (current_drag_data_) {
|
||||
// Nested dragging not supported, fuzzer code a likely culprit.
|
||||
// Cancel the current drag operation and throw an error.
|
||||
@ -1991,7 +1990,7 @@ void EventSender::BeginDragWithItems(
|
||||
|
||||
void EventSender::BeginDragWithFiles(blink::WebLocalFrame* frame,
|
||||
const std::vector<std::string>& files) {
|
||||
WebVector<WebDragData::Item> items;
|
||||
std::vector<WebDragData::Item> items;
|
||||
|
||||
for (const std::string& file_path : files) {
|
||||
WebDragData::FilenameItem item = {
|
||||
@ -2006,7 +2005,7 @@ void EventSender::BeginDragWithFiles(blink::WebLocalFrame* frame,
|
||||
void EventSender::BeginDragWithStringData(blink::WebLocalFrame* frame,
|
||||
const std::string& data,
|
||||
const std::string& mime_type) {
|
||||
WebVector<WebDragData::Item> items;
|
||||
std::vector<WebDragData::Item> items;
|
||||
WebDragData::StringItem item = {
|
||||
.type = WebString::FromUTF8(mime_type),
|
||||
.data = WebString::FromUTF8(data),
|
||||
|
@ -147,9 +147,8 @@ class EventSender {
|
||||
|
||||
void LeapForward(int milliseconds);
|
||||
|
||||
void BeginDragWithItems(
|
||||
blink::WebLocalFrame* frame,
|
||||
const blink::WebVector<blink::WebDragData::Item>& items);
|
||||
void BeginDragWithItems(blink::WebLocalFrame* frame,
|
||||
const std::vector<blink::WebDragData::Item>& items);
|
||||
void BeginDragWithFiles(blink::WebLocalFrame* frame,
|
||||
const std::vector<std::string>& files);
|
||||
void BeginDragWithStringData(blink::WebLocalFrame* frame,
|
||||
|
@ -44,7 +44,7 @@ void SpellCheckClient::CheckSpelling(
|
||||
const blink::WebString& text,
|
||||
size_t& misspelled_offset,
|
||||
size_t& misspelled_length,
|
||||
blink::WebVector<blink::WebString>* optional_suggestions) {
|
||||
std::vector<blink::WebString>* optional_suggestions) {
|
||||
if (!enabled_) {
|
||||
misspelled_offset = 0;
|
||||
misspelled_length = 0;
|
||||
@ -99,7 +99,7 @@ void SpellCheckClient::FinishLastTextCheck() {
|
||||
&misspelled_position, &misspelled_length);
|
||||
if (!misspelled_length)
|
||||
break;
|
||||
blink::WebVector<blink::WebString> suggestions;
|
||||
std::vector<blink::WebString> suggestions;
|
||||
spell_checker_.FillSuggestionList(
|
||||
blink::WebString::FromUTF16(
|
||||
text.substr(misspelled_position, misspelled_length)),
|
||||
|
@ -7,11 +7,12 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "content/web_test/renderer/web_test_spell_checker.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_text_check_client.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
@ -47,7 +48,7 @@ class SpellCheckClient : public blink::WebTextCheckClient {
|
||||
const blink::WebString& text,
|
||||
size_t& offset,
|
||||
size_t& length,
|
||||
blink::WebVector<blink::WebString>* optional_suggestions) override;
|
||||
std::vector<blink::WebString>* optional_suggestions) override;
|
||||
void RequestCheckingOfText(
|
||||
const blink::WebString& text,
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completion) override;
|
||||
|
@ -2892,7 +2892,7 @@ SkBitmap TestRunner::PrintFrameToBitmap(blink::WebLocalFrame* frame) {
|
||||
uint32_t page_count = frame->PrintBegin(print_params, blink::WebNode());
|
||||
|
||||
const printing::PageRanges& page_ranges = GetPrintingPageRanges(frame);
|
||||
blink::WebVector<uint32_t> pages(
|
||||
std::vector<uint32_t> pages(
|
||||
printing::PageNumber::GetPages(page_ranges, page_count));
|
||||
gfx::Size spool_size = frame->SpoolSizeInPixelsForTesting(pages);
|
||||
|
||||
|
@ -416,7 +416,7 @@ void TextInputController::SetComposition(const std::string& text,
|
||||
replacement_range_end - replacement_range_start);
|
||||
if (auto* controller = GetInputMethodController()) {
|
||||
controller->SetComposition(
|
||||
newText, blink::WebVector<ui::ImeTextSpan>(std::move(ime_text_spans)),
|
||||
newText, std::vector<ui::ImeTextSpan>(std::move(ime_text_spans)),
|
||||
replacement_range, textLength, textLength);
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ gfx::Rect BoundsForCharacter(const blink::WebAXObject& object,
|
||||
gfx::RectF inline_text_box_rect = BoundsForObject(inline_text_box);
|
||||
|
||||
int local_index = character_index - start;
|
||||
blink::WebVector<int> character_offsets;
|
||||
std::vector<int> character_offsets;
|
||||
inline_text_box.CharacterOffsets(character_offsets);
|
||||
if (character_offsets.size() != name.length())
|
||||
return gfx::Rect();
|
||||
@ -196,8 +196,8 @@ void GetBoundariesForOneWord(const blink::WebAXObject& object,
|
||||
continue;
|
||||
int local_index = character_index - start;
|
||||
|
||||
blink::WebVector<int> starts;
|
||||
blink::WebVector<int> ends;
|
||||
std::vector<int> starts;
|
||||
std::vector<int> ends;
|
||||
inline_text_box.GetWordBoundaries(starts, ends);
|
||||
size_t word_count = starts.size();
|
||||
DCHECK_EQ(ends.size(), word_count);
|
||||
@ -1242,7 +1242,7 @@ int32_t WebAXObjectProxy::RowHeadersCount() {
|
||||
if (!UpdateLayout()) {
|
||||
return 0;
|
||||
}
|
||||
blink::WebVector<blink::WebAXObject> headers;
|
||||
std::vector<blink::WebAXObject> headers;
|
||||
accessibility_object_.RowHeaders(headers);
|
||||
return static_cast<int32_t>(headers.size());
|
||||
}
|
||||
@ -1258,7 +1258,7 @@ int32_t WebAXObjectProxy::ColumnHeadersCount() {
|
||||
if (!UpdateLayout()) {
|
||||
return 0;
|
||||
}
|
||||
blink::WebVector<blink::WebAXObject> headers;
|
||||
std::vector<blink::WebAXObject> headers;
|
||||
accessibility_object_.ColumnHeaders(headers);
|
||||
return static_cast<int32_t>(headers.size());
|
||||
}
|
||||
@ -1362,7 +1362,7 @@ v8::Local<v8::Object> WebAXObjectProxy::AriaOwnsElementAtIndex(unsigned index) {
|
||||
if (!UpdateLayout()) {
|
||||
return v8::Local<v8::Object>();
|
||||
}
|
||||
blink::WebVector<blink::WebAXObject> elements;
|
||||
std::vector<blink::WebAXObject> elements;
|
||||
accessibility_object_.AriaOwns(elements);
|
||||
size_t element_count = elements.size();
|
||||
if (index >= element_count)
|
||||
@ -1446,7 +1446,7 @@ v8::Local<v8::Object> WebAXObjectProxy::RowHeaderAtIndex(unsigned index) {
|
||||
if (!UpdateLayout()) {
|
||||
return v8::Local<v8::Object>();
|
||||
}
|
||||
blink::WebVector<blink::WebAXObject> headers;
|
||||
std::vector<blink::WebAXObject> headers;
|
||||
accessibility_object_.RowHeaders(headers);
|
||||
size_t header_count = headers.size();
|
||||
if (index >= header_count)
|
||||
@ -1459,7 +1459,7 @@ v8::Local<v8::Object> WebAXObjectProxy::ColumnHeaderAtIndex(unsigned index) {
|
||||
if (!UpdateLayout()) {
|
||||
return v8::Local<v8::Object>();
|
||||
}
|
||||
blink::WebVector<blink::WebAXObject> headers;
|
||||
std::vector<blink::WebAXObject> headers;
|
||||
accessibility_object_.ColumnHeaders(headers);
|
||||
size_t header_count = headers.size();
|
||||
if (index >= header_count)
|
||||
@ -1849,7 +1849,7 @@ std::string WebAXObjectProxy::NameFrom() {
|
||||
return "";
|
||||
}
|
||||
ax::mojom::NameFrom name_from = ax::mojom::NameFrom::kNone;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
switch (name_from) {
|
||||
case ax::mojom::NameFrom::kNone:
|
||||
@ -1864,7 +1864,7 @@ int WebAXObjectProxy::NameElementCount() {
|
||||
return 0;
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
return static_cast<int>(name_objects.size());
|
||||
}
|
||||
@ -1874,7 +1874,7 @@ v8::Local<v8::Object> WebAXObjectProxy::NameElementAtIndex(unsigned index) {
|
||||
return {};
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
if (index >= name_objects.size())
|
||||
return {};
|
||||
@ -1886,10 +1886,10 @@ std::string WebAXObjectProxy::Description() {
|
||||
return "";
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
ax::mojom::DescriptionFrom description_from;
|
||||
blink::WebVector<blink::WebAXObject> description_objects;
|
||||
std::vector<blink::WebAXObject> description_objects;
|
||||
return accessibility_object_
|
||||
.Description(name_from, description_from, description_objects)
|
||||
.Utf8();
|
||||
@ -1900,11 +1900,11 @@ std::string WebAXObjectProxy::DescriptionFrom() {
|
||||
return "";
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
ax::mojom::DescriptionFrom description_from =
|
||||
ax::mojom::DescriptionFrom::kNone;
|
||||
blink::WebVector<blink::WebAXObject> description_objects;
|
||||
std::vector<blink::WebAXObject> description_objects;
|
||||
accessibility_object_.Description(name_from, description_from,
|
||||
description_objects);
|
||||
switch (description_from) {
|
||||
@ -1920,7 +1920,7 @@ std::string WebAXObjectProxy::Placeholder() {
|
||||
return "";
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
return accessibility_object_.Placeholder(name_from).Utf8();
|
||||
}
|
||||
@ -1937,10 +1937,10 @@ int WebAXObjectProxy::DescriptionElementCount() {
|
||||
return 0;
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
ax::mojom::DescriptionFrom description_from;
|
||||
blink::WebVector<blink::WebAXObject> description_objects;
|
||||
std::vector<blink::WebAXObject> description_objects;
|
||||
accessibility_object_.Description(name_from, description_from,
|
||||
description_objects);
|
||||
return static_cast<int>(description_objects.size());
|
||||
@ -1952,10 +1952,10 @@ v8::Local<v8::Object> WebAXObjectProxy::DescriptionElementAtIndex(
|
||||
return v8::Local<v8::Object>();
|
||||
}
|
||||
ax::mojom::NameFrom name_from;
|
||||
blink::WebVector<blink::WebAXObject> name_objects;
|
||||
std::vector<blink::WebAXObject> name_objects;
|
||||
accessibility_object_.GetName(name_from, name_objects);
|
||||
ax::mojom::DescriptionFrom description_from;
|
||||
blink::WebVector<blink::WebAXObject> description_objects;
|
||||
std::vector<blink::WebAXObject> description_objects;
|
||||
accessibility_object_.Description(name_from, description_from,
|
||||
description_objects);
|
||||
if (index >= description_objects.size())
|
||||
|
@ -21,9 +21,8 @@ namespace content {
|
||||
|
||||
namespace {
|
||||
|
||||
void Append(blink::WebVector<blink::WebString>* data,
|
||||
const blink::WebString& item) {
|
||||
blink::WebVector<blink::WebString> result(data->size() + 1);
|
||||
void Append(std::vector<blink::WebString>* data, const blink::WebString& item) {
|
||||
std::vector<blink::WebString> result(data->size() + 1);
|
||||
for (size_t i = 0; i < data->size(); ++i)
|
||||
result[i] = (*data)[i];
|
||||
result[data->size()] = item;
|
||||
@ -135,7 +134,7 @@ bool WebTestSpellChecker::IsMultiWordMisspelling(
|
||||
|
||||
void WebTestSpellChecker::FillSuggestionList(
|
||||
const blink::WebString& word,
|
||||
blink::WebVector<blink::WebString>* suggestions) {
|
||||
std::vector<blink::WebString>* suggestions) {
|
||||
if (word == "wellcome")
|
||||
Append(suggestions, blink::WebString::FromUTF8("welcome"));
|
||||
else if (word == "upper case")
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_result.h"
|
||||
|
||||
namespace content {
|
||||
@ -20,9 +19,8 @@ namespace content {
|
||||
// suitable for any other usages.
|
||||
class WebTestSpellChecker {
|
||||
public:
|
||||
static void FillSuggestionList(
|
||||
const blink::WebString& word,
|
||||
blink::WebVector<blink::WebString>* suggestions);
|
||||
static void FillSuggestionList(const blink::WebString& word,
|
||||
std::vector<blink::WebString>* suggestions);
|
||||
|
||||
WebTestSpellChecker();
|
||||
~WebTestSpellChecker();
|
||||
|
@ -29,7 +29,7 @@ class FrameContentWatcher
|
||||
public content::RenderFrameObserverTracker<FrameContentWatcher> {
|
||||
public:
|
||||
FrameContentWatcher(content::RenderFrame* render_frame,
|
||||
const blink::WebVector<blink::WebString>& css_selectors);
|
||||
const std::vector<blink::WebString>& css_selectors);
|
||||
|
||||
FrameContentWatcher(const FrameContentWatcher&) = delete;
|
||||
FrameContentWatcher& operator=(const FrameContentWatcher&) = delete;
|
||||
@ -40,11 +40,10 @@ class FrameContentWatcher
|
||||
void OnDestruct() override;
|
||||
void DidCreateDocumentElement() override;
|
||||
void DidMatchCSS(
|
||||
const blink::WebVector<blink::WebString>& newly_matching_selectors,
|
||||
const blink::WebVector<blink::WebString>& stopped_matching_selectors)
|
||||
override;
|
||||
const std::vector<blink::WebString>& newly_matching_selectors,
|
||||
const std::vector<blink::WebString>& stopped_matching_selectors) override;
|
||||
|
||||
void UpdateCSSSelectors(const blink::WebVector<blink::WebString>& selectors);
|
||||
void UpdateCSSSelectors(const std::vector<blink::WebString>& selectors);
|
||||
|
||||
private:
|
||||
// Given that we saw a change in the CSS selectors that the associated frame
|
||||
@ -59,14 +58,14 @@ class FrameContentWatcher
|
||||
// frames the top frame cannot access, we may have to rethink this.
|
||||
void NotifyBrowserOfChange();
|
||||
|
||||
blink::WebVector<blink::WebString> css_selectors_;
|
||||
std::vector<blink::WebString> css_selectors_;
|
||||
std::set<std::string> matching_selectors_;
|
||||
bool document_created_ = false;
|
||||
};
|
||||
|
||||
FrameContentWatcher::FrameContentWatcher(
|
||||
content::RenderFrame* render_frame,
|
||||
const blink::WebVector<blink::WebString>& css_selectors)
|
||||
const std::vector<blink::WebString>& css_selectors)
|
||||
: content::RenderFrameObserver(render_frame),
|
||||
content::RenderFrameObserverTracker<FrameContentWatcher>(render_frame),
|
||||
css_selectors_(css_selectors) {}
|
||||
@ -84,8 +83,8 @@ void FrameContentWatcher::DidCreateDocumentElement() {
|
||||
}
|
||||
|
||||
void FrameContentWatcher::DidMatchCSS(
|
||||
const blink::WebVector<blink::WebString>& newly_matching_selectors,
|
||||
const blink::WebVector<blink::WebString>& stopped_matching_selectors) {
|
||||
const std::vector<blink::WebString>& newly_matching_selectors,
|
||||
const std::vector<blink::WebString>& stopped_matching_selectors) {
|
||||
for (size_t i = 0; i < stopped_matching_selectors.size(); ++i)
|
||||
matching_selectors_.erase(stopped_matching_selectors[i].Utf8());
|
||||
for (size_t i = 0; i < newly_matching_selectors.size(); ++i)
|
||||
@ -95,7 +94,7 @@ void FrameContentWatcher::DidMatchCSS(
|
||||
}
|
||||
|
||||
void FrameContentWatcher::UpdateCSSSelectors(
|
||||
const blink::WebVector<blink::WebString>& selectors) {
|
||||
const std::vector<blink::WebString>& selectors) {
|
||||
css_selectors_ = selectors;
|
||||
if (document_created_) {
|
||||
render_frame()->GetWebFrame()->GetDocument().WatchCSSSelectors(
|
||||
@ -146,7 +145,7 @@ ContentWatcher::~ContentWatcher() = default;
|
||||
|
||||
void ContentWatcher::OnWatchPages(
|
||||
const std::vector<std::string>& new_css_selectors_utf8) {
|
||||
blink::WebVector<blink::WebString> new_css_selectors(
|
||||
std::vector<blink::WebString> new_css_selectors(
|
||||
new_css_selectors_utf8.size());
|
||||
bool changed = new_css_selectors.size() != css_selectors_.size();
|
||||
for (size_t i = 0; i < new_css_selectors.size(); ++i) {
|
||||
@ -165,8 +164,7 @@ void ContentWatcher::OnWatchPages(
|
||||
// will trigger calls to DidMatchCSS after Blink has a chance to apply the new
|
||||
// style, which will in turn notify the browser about the changes.
|
||||
struct WatchSelectors : public content::RenderFrameVisitor {
|
||||
explicit WatchSelectors(
|
||||
const blink::WebVector<blink::WebString>& css_selectors)
|
||||
explicit WatchSelectors(const std::vector<blink::WebString>& css_selectors)
|
||||
: css_selectors(css_selectors) {}
|
||||
|
||||
bool Visit(content::RenderFrame* frame) override {
|
||||
@ -174,7 +172,7 @@ void ContentWatcher::OnWatchPages(
|
||||
return true; // Continue visiting.
|
||||
}
|
||||
|
||||
const raw_ref<const blink::WebVector<blink::WebString>> css_selectors;
|
||||
const raw_ref<const std::vector<blink::WebString>> css_selectors;
|
||||
};
|
||||
WatchSelectors visitor(css_selectors_);
|
||||
content::RenderFrame::ForEach(&visitor);
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
class WebString;
|
||||
}
|
||||
@ -43,7 +41,7 @@ class ContentWatcher {
|
||||
private:
|
||||
// If any of these selectors match on a page, we need to call
|
||||
// extensions::mojom::LocalFrameHost::WatchedPageChange to notify the browser.
|
||||
blink::WebVector<blink::WebString> css_selectors_;
|
||||
std::vector<blink::WebString> css_selectors_;
|
||||
};
|
||||
|
||||
} // namespace extensions
|
||||
|
@ -37,7 +37,7 @@ WebEngineURLLoaderThrottleProvider::Clone() {
|
||||
return cloned_provider;
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
WebEngineURLLoaderThrottleProvider::CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) {
|
||||
@ -49,7 +49,7 @@ WebEngineURLLoaderThrottleProvider::CreateThrottles(
|
||||
return {};
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
auto rules = content_renderer_client_->GetRewriteRulesForFrameToken(
|
||||
local_frame_token.value());
|
||||
if (rules) {
|
||||
|
@ -29,7 +29,7 @@ class WebEngineURLLoaderThrottleProvider
|
||||
|
||||
// blink::URLLoaderThrottleProvider implementation.
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override;
|
||||
void SetOnline(bool is_online) override;
|
||||
|
@ -45,10 +45,10 @@ class HeadlessContentRendererUrlLoaderThrottleProvider
|
||||
base::PassKey<HeadlessContentRendererUrlLoaderThrottleProvider>());
|
||||
}
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const blink::LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) override {
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
if (local_frame_token.has_value()) {
|
||||
auto throttle =
|
||||
content::MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating(
|
||||
|
@ -5,11 +5,11 @@
|
||||
#include "pdf/parsed_params.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "pdf/pdfium/pdfium_form_filler.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_plugin_params.h"
|
||||
|
||||
namespace chrome_pdf {
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "pdf/pdfium/pdfium_form_filler.h"
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_plugin_params.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_content_settings_client.h"
|
||||
#include "third_party/blink/public/platform/web_media_key_system_media_capability.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
|
||||
namespace media {
|
||||
@ -79,10 +78,10 @@ class BLINK_PLATFORM_EXPORT KeySystemConfigSelector {
|
||||
using SelectConfigCB = base::OnceCallback<
|
||||
void(Status status, WebMediaKeySystemConfiguration*, media::CdmConfig*)>;
|
||||
|
||||
void SelectConfig(
|
||||
const WebString& key_system,
|
||||
const WebVector<WebMediaKeySystemConfiguration>& candidate_configurations,
|
||||
SelectConfigCB cb);
|
||||
void SelectConfig(const WebString& key_system,
|
||||
const std::vector<WebMediaKeySystemConfiguration>&
|
||||
candidate_configurations,
|
||||
SelectConfigCB cb);
|
||||
|
||||
using IsSupportedMediaTypeCB =
|
||||
base::RepeatingCallback<bool(const std::string& container_mime_type,
|
||||
@ -123,7 +122,7 @@ class BLINK_PLATFORM_EXPORT KeySystemConfigSelector {
|
||||
bool GetSupportedCapabilities(
|
||||
const std::string& key_system,
|
||||
media::EmeMediaType media_type,
|
||||
const WebVector<WebMediaKeySystemMediaCapability>&
|
||||
const std::vector<WebMediaKeySystemMediaCapability>&
|
||||
requested_media_capabilities,
|
||||
ConfigState* config_state,
|
||||
std::vector<WebMediaKeySystemMediaCapability>*
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_private_ptr.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
|
2
third_party/blink/public/platform/modules/service_worker/web_service_worker_fetch_context.h
vendored
2
third_party/blink/public/platform/modules/service_worker/web_service_worker_fetch_context.h
vendored
@ -39,7 +39,7 @@ class BLINK_EXPORT WebServiceWorkerFetchContext : public WebWorkerFetchContext {
|
||||
preference_watcher_receiver,
|
||||
CrossVariantMojoReceiver<mojom::SubresourceLoaderUpdaterInterfaceBase>
|
||||
pending_subresource_loader_updater,
|
||||
const WebVector<WebString>& cors_exempt_header_list,
|
||||
const std::vector<WebString>& cors_exempt_header_list,
|
||||
const bool is_third_party_context);
|
||||
};
|
||||
|
||||
|
@ -31,12 +31,12 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom-shared.h"
|
||||
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_object_info.h"
|
||||
#include "third_party/blink/public/platform/web_callbacks.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -73,7 +73,7 @@ class WebServiceWorkerProvider {
|
||||
const WebServiceWorkerError&>;
|
||||
|
||||
using WebServiceWorkerGetRegistrationsCallbacks =
|
||||
WebCallbacks<WebVector<WebServiceWorkerRegistrationObjectInfo>,
|
||||
WebCallbacks<std::vector<WebServiceWorkerRegistrationObjectInfo>,
|
||||
const WebServiceWorkerError&>;
|
||||
using GetRegistrationForReadyCallback =
|
||||
base::OnceCallback<void(WebServiceWorkerRegistrationObjectInfo)>;
|
||||
|
1
third_party/blink/public/platform/modules/service_worker/web_service_worker_provider_client.h
vendored
1
third_party/blink/public/platform/modules/service_worker/web_service_worker_provider_client.h
vendored
@ -35,7 +35,6 @@
|
||||
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
|
||||
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "third_party/blink/public/common/media/video_capture.h"
|
||||
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -143,7 +142,7 @@ class BLINK_PLATFORM_EXPORT WebVideoCaptureImplManager {
|
||||
void UnrefDevice(const media::VideoCaptureSessionId& id);
|
||||
|
||||
// Devices currently in use.
|
||||
WebVector<DeviceEntry> devices_;
|
||||
std::vector<DeviceEntry> devices_;
|
||||
|
||||
// This is an internal ID for identifying clients of VideoCaptureImpl.
|
||||
// The ID is global for the render process.
|
||||
|
@ -6,13 +6,13 @@
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_URL_LOADER_THROTTLE_PROVIDER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/types/optional_ref.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
#include "third_party/blink/public/common/tokens/tokens.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_url_request.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace network {
|
||||
struct ResourceRequest;
|
||||
@ -78,7 +78,7 @@ class BLINK_PLATFORM_EXPORT URLLoaderThrottleProvider {
|
||||
// Dedicated, shared and service workers call it on the worker thread.
|
||||
//`local_frame_token` will be set to the corresponding frame for frame and
|
||||
// dedicated worker requests, otherwise it will not be set.
|
||||
virtual WebVector<std::unique_ptr<URLLoaderThrottle>> CreateThrottles(
|
||||
virtual std::vector<std::unique_ptr<URLLoaderThrottle>> CreateThrottles(
|
||||
base::optional_ref<const LocalFrameToken> local_frame_token,
|
||||
const network::ResourceRequest& request) = 0;
|
||||
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "media/base/output_device_info.h"
|
||||
#include "third_party/blink/public/platform/web_audio_sink_descriptor.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_AUDIO_SOURCE_PROVIDER_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_AUDIO_SOURCE_PROVIDER_H_
|
||||
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include <vector>
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -38,7 +38,7 @@ class WebAudioSourceProvider {
|
||||
|
||||
// ProvideInput() gets called repeatedly to render time-slices of a continuous
|
||||
// audio stream. May be called from any thread.
|
||||
virtual void ProvideInput(const WebVector<float*>& audio_data,
|
||||
virtual void ProvideInput(const std::vector<float*>& audio_data,
|
||||
int number_of_frames) = 0;
|
||||
|
||||
// If a client is set, we call it back when the audio format is available.
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/functional/callback_forward.h"
|
||||
@ -18,7 +19,6 @@
|
||||
#include "media/base/audio_renderer_sink.h"
|
||||
#include "third_party/blink/public/platform/web_audio_source_provider.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace media {
|
||||
class MediaLog;
|
||||
@ -67,7 +67,7 @@ class BLINK_PLATFORM_EXPORT WebAudioSourceProviderImpl
|
||||
|
||||
// WebAudioSourceProvider implementation.
|
||||
void SetClient(WebAudioSourceProviderClient* client) override;
|
||||
void ProvideInput(const WebVector<float*>& audio_data,
|
||||
void ProvideInput(const std::vector<float*>& audio_data,
|
||||
int number_of_frames) override;
|
||||
|
||||
// RestartableAudioRendererSink implementation.
|
||||
|
@ -31,11 +31,12 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CONTENT_DECRYPTION_MODULE_SESSION_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CONTENT_DECRYPTION_MODULE_SESSION_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_content_decryption_module_exception.h"
|
||||
#include "third_party/blink/public/platform/web_content_decryption_module_result.h"
|
||||
#include "third_party/blink/public/platform/web_encrypted_media_types.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace media {
|
||||
enum class CdmMessageType;
|
||||
@ -69,7 +70,7 @@ class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession {
|
||||
// renewed, etc.) and the browser should attempt to resume playback
|
||||
// if necessary.
|
||||
virtual void OnSessionKeysChange(
|
||||
const WebVector<WebEncryptedMediaKeyInformation>&,
|
||||
const std::vector<WebEncryptedMediaKeyInformation>&,
|
||||
bool has_additional_usable_key) = 0;
|
||||
|
||||
protected:
|
||||
|
22
third_party/blink/public/platform/web_crypto.h
vendored
22
third_party/blink/public/platform/web_crypto.h
vendored
@ -32,6 +32,7 @@
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_H_
|
||||
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -40,7 +41,6 @@
|
||||
#include "third_party/blink/public/platform/web_crypto_key.h"
|
||||
#include "third_party/blink/public/platform/web_private_ptr.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
#if INSIDE_BLINK
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
@ -188,7 +188,7 @@ class WebCrypto {
|
||||
virtual void Encrypt(
|
||||
const WebCryptoAlgorithm&,
|
||||
const WebCryptoKey&,
|
||||
WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
|
||||
@ -196,14 +196,14 @@ class WebCrypto {
|
||||
virtual void Decrypt(
|
||||
const WebCryptoAlgorithm&,
|
||||
const WebCryptoKey&,
|
||||
WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
|
||||
}
|
||||
virtual void Sign(const WebCryptoAlgorithm&,
|
||||
const WebCryptoKey&,
|
||||
WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
|
||||
@ -211,14 +211,14 @@ class WebCrypto {
|
||||
virtual void VerifySignature(
|
||||
const WebCryptoAlgorithm&,
|
||||
const WebCryptoKey&,
|
||||
WebVector<unsigned char> signature,
|
||||
WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> signature,
|
||||
std::vector<unsigned char> data,
|
||||
WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
|
||||
}
|
||||
virtual void Digest(const WebCryptoAlgorithm&,
|
||||
WebVector<unsigned char> data,
|
||||
std::vector<unsigned char> data,
|
||||
WebCryptoResult result,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
||||
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
|
||||
@ -233,7 +233,7 @@ class WebCrypto {
|
||||
}
|
||||
virtual void ImportKey(
|
||||
WebCryptoKeyFormat,
|
||||
WebVector<unsigned char> key_data,
|
||||
std::vector<unsigned char> key_data,
|
||||
const WebCryptoAlgorithm&,
|
||||
bool extractable,
|
||||
WebCryptoKeyUsageMask,
|
||||
@ -259,7 +259,7 @@ class WebCrypto {
|
||||
}
|
||||
virtual void UnwrapKey(
|
||||
WebCryptoKeyFormat,
|
||||
WebVector<unsigned char> wrapped_key,
|
||||
std::vector<unsigned char> wrapped_key,
|
||||
const WebCryptoKey&,
|
||||
const WebCryptoAlgorithm& unwrap_algorithm,
|
||||
const WebCryptoAlgorithm& unwrapped_key_algorithm,
|
||||
@ -340,10 +340,10 @@ class WebCrypto {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Writes the key data into the given WebVector.
|
||||
// Writes the key data into the given std::vector.
|
||||
// Returns true on success.
|
||||
virtual bool SerializeKeyForClone(const WebCryptoKey&,
|
||||
WebVector<unsigned char>&) {
|
||||
std::vector<unsigned char>&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -33,12 +33,12 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_algorithm.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_key.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -63,17 +63,17 @@ class WebCryptoAlgorithmParams {
|
||||
|
||||
class WebCryptoAesCbcParams : public WebCryptoAlgorithmParams {
|
||||
public:
|
||||
explicit WebCryptoAesCbcParams(WebVector<unsigned char> iv)
|
||||
explicit WebCryptoAesCbcParams(std::vector<unsigned char> iv)
|
||||
: iv_(std::move(iv)) {}
|
||||
|
||||
WebCryptoAlgorithmParamsType GetType() const override {
|
||||
return kWebCryptoAlgorithmParamsTypeAesCbcParams;
|
||||
}
|
||||
|
||||
const WebVector<unsigned char>& Iv() const { return iv_; }
|
||||
const std::vector<unsigned char>& Iv() const { return iv_; }
|
||||
|
||||
private:
|
||||
const WebVector<unsigned char> iv_;
|
||||
const std::vector<unsigned char> iv_;
|
||||
};
|
||||
|
||||
class WebCryptoAlgorithmParamsWithHash : public WebCryptoAlgorithmParams {
|
||||
@ -92,7 +92,7 @@ class WebCryptoAlgorithmParamsWithHash : public WebCryptoAlgorithmParams {
|
||||
class WebCryptoAesCtrParams : public WebCryptoAlgorithmParams {
|
||||
public:
|
||||
WebCryptoAesCtrParams(unsigned char length_bits,
|
||||
WebVector<unsigned char> counter)
|
||||
std::vector<unsigned char> counter)
|
||||
: WebCryptoAlgorithmParams(),
|
||||
counter_(std::move(counter)),
|
||||
length_bits_(length_bits) {}
|
||||
@ -101,11 +101,11 @@ class WebCryptoAesCtrParams : public WebCryptoAlgorithmParams {
|
||||
return kWebCryptoAlgorithmParamsTypeAesCtrParams;
|
||||
}
|
||||
|
||||
const WebVector<unsigned char>& Counter() const { return counter_; }
|
||||
const std::vector<unsigned char>& Counter() const { return counter_; }
|
||||
unsigned char LengthBits() const { return length_bits_; }
|
||||
|
||||
private:
|
||||
const WebVector<unsigned char> counter_;
|
||||
const std::vector<unsigned char> counter_;
|
||||
const unsigned char length_bits_;
|
||||
};
|
||||
|
||||
@ -181,9 +181,9 @@ class WebCryptoHmacKeyGenParams : public WebCryptoAlgorithmParamsWithHash {
|
||||
|
||||
class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams {
|
||||
public:
|
||||
WebCryptoAesGcmParams(WebVector<unsigned char> iv,
|
||||
WebCryptoAesGcmParams(std::vector<unsigned char> iv,
|
||||
bool has_additional_data,
|
||||
WebVector<unsigned char> additional_data,
|
||||
std::vector<unsigned char> additional_data,
|
||||
bool has_tag_length_bits,
|
||||
unsigned char tag_length_bits)
|
||||
: iv_(std::move(iv)),
|
||||
@ -199,10 +199,10 @@ class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams {
|
||||
return kWebCryptoAlgorithmParamsTypeAesGcmParams;
|
||||
}
|
||||
|
||||
const WebVector<unsigned char>& Iv() const { return iv_; }
|
||||
const std::vector<unsigned char>& Iv() const { return iv_; }
|
||||
|
||||
bool HasAdditionalData() const { return has_additional_data_; }
|
||||
const WebVector<unsigned char>& OptionalAdditionalData() const {
|
||||
const std::vector<unsigned char>& OptionalAdditionalData() const {
|
||||
return optional_additional_data_;
|
||||
}
|
||||
|
||||
@ -210,9 +210,9 @@ class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams {
|
||||
unsigned OptionalTagLengthBits() const { return optional_tag_length_bits_; }
|
||||
|
||||
private:
|
||||
const WebVector<unsigned char> iv_;
|
||||
const std::vector<unsigned char> iv_;
|
||||
const bool has_additional_data_;
|
||||
const WebVector<unsigned char> optional_additional_data_;
|
||||
const std::vector<unsigned char> optional_additional_data_;
|
||||
const bool has_tag_length_bits_;
|
||||
const unsigned char optional_tag_length_bits_;
|
||||
};
|
||||
@ -231,7 +231,7 @@ class WebCryptoRsaHashedKeyGenParams : public WebCryptoAlgorithmParams {
|
||||
public:
|
||||
WebCryptoRsaHashedKeyGenParams(const WebCryptoAlgorithm& hash,
|
||||
unsigned modulus_length_bits,
|
||||
WebVector<unsigned char> public_exponent)
|
||||
std::vector<unsigned char> public_exponent)
|
||||
: modulus_length_bits_(modulus_length_bits),
|
||||
public_exponent_(std::move(public_exponent)),
|
||||
hash_(hash) {
|
||||
@ -243,7 +243,7 @@ class WebCryptoRsaHashedKeyGenParams : public WebCryptoAlgorithmParams {
|
||||
}
|
||||
|
||||
unsigned ModulusLengthBits() const { return modulus_length_bits_; }
|
||||
const WebVector<unsigned char>& PublicExponent() const {
|
||||
const std::vector<unsigned char>& PublicExponent() const {
|
||||
return public_exponent_;
|
||||
}
|
||||
const WebCryptoAlgorithm& GetHash() const { return hash_; }
|
||||
@ -265,13 +265,13 @@ class WebCryptoRsaHashedKeyGenParams : public WebCryptoAlgorithmParams {
|
||||
|
||||
private:
|
||||
const unsigned modulus_length_bits_;
|
||||
const WebVector<unsigned char> public_exponent_;
|
||||
const std::vector<unsigned char> public_exponent_;
|
||||
const WebCryptoAlgorithm hash_;
|
||||
};
|
||||
|
||||
class WebCryptoRsaOaepParams : public WebCryptoAlgorithmParams {
|
||||
public:
|
||||
WebCryptoRsaOaepParams(bool has_label, WebVector<unsigned char> label)
|
||||
WebCryptoRsaOaepParams(bool has_label, std::vector<unsigned char> label)
|
||||
: has_label_(has_label), optional_label_(std::move(label)) {
|
||||
DCHECK(has_label || optional_label_.empty());
|
||||
}
|
||||
@ -281,13 +281,13 @@ class WebCryptoRsaOaepParams : public WebCryptoAlgorithmParams {
|
||||
}
|
||||
|
||||
bool HasLabel() const { return has_label_; }
|
||||
const WebVector<unsigned char>& OptionalLabel() const {
|
||||
const std::vector<unsigned char>& OptionalLabel() const {
|
||||
return optional_label_;
|
||||
}
|
||||
|
||||
private:
|
||||
const bool has_label_;
|
||||
const WebVector<unsigned char> optional_label_;
|
||||
const std::vector<unsigned char> optional_label_;
|
||||
};
|
||||
|
||||
class WebCryptoRsaPssParams : public WebCryptoAlgorithmParams {
|
||||
@ -378,29 +378,29 @@ class WebCryptoAesDerivedKeyParams : public WebCryptoAlgorithmParams {
|
||||
class WebCryptoHkdfParams : public WebCryptoAlgorithmParamsWithHash {
|
||||
public:
|
||||
WebCryptoHkdfParams(const WebCryptoAlgorithm& hash,
|
||||
WebVector<unsigned char> salt,
|
||||
WebVector<unsigned char> info)
|
||||
std::vector<unsigned char> salt,
|
||||
std::vector<unsigned char> info)
|
||||
: WebCryptoAlgorithmParamsWithHash(hash),
|
||||
salt_(std::move(salt)),
|
||||
info_(std::move(info)) {}
|
||||
|
||||
const WebVector<unsigned char>& Salt() const { return salt_; }
|
||||
const std::vector<unsigned char>& Salt() const { return salt_; }
|
||||
|
||||
const WebVector<unsigned char>& Info() const { return info_; }
|
||||
const std::vector<unsigned char>& Info() const { return info_; }
|
||||
|
||||
WebCryptoAlgorithmParamsType GetType() const override {
|
||||
return kWebCryptoAlgorithmParamsTypeHkdfParams;
|
||||
}
|
||||
|
||||
private:
|
||||
const WebVector<unsigned char> salt_;
|
||||
const WebVector<unsigned char> info_;
|
||||
const std::vector<unsigned char> salt_;
|
||||
const std::vector<unsigned char> info_;
|
||||
};
|
||||
|
||||
class WebCryptoPbkdf2Params : public WebCryptoAlgorithmParamsWithHash {
|
||||
public:
|
||||
WebCryptoPbkdf2Params(const WebCryptoAlgorithm& hash,
|
||||
WebVector<unsigned char> salt,
|
||||
std::vector<unsigned char> salt,
|
||||
unsigned iterations)
|
||||
: WebCryptoAlgorithmParamsWithHash(hash),
|
||||
salt_(std::move(salt)),
|
||||
@ -410,11 +410,11 @@ class WebCryptoPbkdf2Params : public WebCryptoAlgorithmParamsWithHash {
|
||||
return kWebCryptoAlgorithmParamsTypePbkdf2Params;
|
||||
}
|
||||
|
||||
const WebVector<unsigned char>& Salt() const { return salt_; }
|
||||
const std::vector<unsigned char>& Salt() const { return salt_; }
|
||||
unsigned Iterations() const { return iterations_; }
|
||||
|
||||
private:
|
||||
const WebVector<unsigned char> salt_;
|
||||
const std::vector<unsigned char> salt_;
|
||||
const unsigned iterations_;
|
||||
};
|
||||
|
||||
|
@ -31,10 +31,11 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_KEY_ALGORITHM_PARAMS_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_KEY_ALGORITHM_PARAMS_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_algorithm.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -50,7 +51,8 @@ class WebCryptoKeyAlgorithmDictionary {
|
||||
virtual void SetString(const char*, const char*) = 0;
|
||||
virtual void SetUint(const char*, unsigned) = 0;
|
||||
virtual void SetAlgorithm(const char*, const WebCryptoAlgorithm&) = 0;
|
||||
virtual void SetUint8Array(const char*, const WebVector<unsigned char>&) = 0;
|
||||
virtual void SetUint8Array(const char*,
|
||||
const std::vector<unsigned char>&) = 0;
|
||||
};
|
||||
|
||||
enum WebCryptoKeyAlgorithmParamsType {
|
||||
@ -127,7 +129,7 @@ class WebCryptoRsaHashedKeyAlgorithmParams
|
||||
|
||||
unsigned ModulusLengthBits() const { return modulus_length_bits_; }
|
||||
|
||||
const WebVector<unsigned char>& PublicExponent() const {
|
||||
const std::vector<unsigned char>& PublicExponent() const {
|
||||
return public_exponent_;
|
||||
}
|
||||
|
||||
@ -145,7 +147,7 @@ class WebCryptoRsaHashedKeyAlgorithmParams
|
||||
|
||||
private:
|
||||
unsigned modulus_length_bits_;
|
||||
WebVector<unsigned char> public_exponent_;
|
||||
std::vector<unsigned char> public_exponent_;
|
||||
WebCryptoAlgorithm hash_;
|
||||
};
|
||||
|
||||
|
5
third_party/blink/public/platform/web_data.h
vendored
5
third_party/blink/public/platform/web_data.h
vendored
@ -31,10 +31,11 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DATA_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DATA_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_private_ptr.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/forward.h"
|
||||
|
||||
#if INSIDE_BLINK
|
||||
@ -76,7 +77,7 @@ class BLINK_PLATFORM_EXPORT WebData {
|
||||
// Same as SharedBuffer::CopyAs, copies the segmented data into a
|
||||
// contiguous buffer. Use GetSomeData() or ForEachSegment() whenever
|
||||
// possible, if a copy can be avoided.
|
||||
WebVector<uint8_t> Copy() const;
|
||||
std::vector<uint8_t> Copy() const;
|
||||
|
||||
// Helper for applying a lambda to all data segments sequentially:
|
||||
//
|
||||
|
@ -31,6 +31,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DRAG_DATA_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DRAG_DATA_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
|
||||
#include "third_party/abseil-cpp/absl/types/variant.h"
|
||||
@ -41,7 +43,6 @@
|
||||
#include "third_party/blink/public/platform/web_data.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -103,9 +104,9 @@ class BLINK_PLATFORM_EXPORT WebDragData {
|
||||
|
||||
~WebDragData() = default;
|
||||
|
||||
const WebVector<Item>& Items() const { return item_list_; }
|
||||
const std::vector<Item>& Items() const { return item_list_; }
|
||||
|
||||
void SetItems(WebVector<Item> item_list);
|
||||
void SetItems(std::vector<Item> item_list);
|
||||
|
||||
void AddItem(const Item&);
|
||||
|
||||
@ -131,7 +132,7 @@ class BLINK_PLATFORM_EXPORT WebDragData {
|
||||
}
|
||||
|
||||
private:
|
||||
WebVector<Item> item_list_;
|
||||
std::vector<Item> item_list_;
|
||||
WebString filesystem_id_;
|
||||
|
||||
// If true, the renderer always performs the default action for the drop.
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_ICON_SIZES_PARSER_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_ICON_SIZES_PARSER_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace gfx {
|
||||
class Size;
|
||||
@ -21,7 +22,7 @@ class WebString;
|
||||
// TODO(zqzhang): merge with WebIconURL, and rename it "WebIcon"?
|
||||
class BLINK_PLATFORM_EXPORT WebIconSizesParser {
|
||||
public:
|
||||
static WebVector<gfx::Size> ParseIconSizes(const WebString& sizes_string);
|
||||
static std::vector<gfx::Size> ParseIconSizes(const WebString& sizes_string);
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
|
@ -5,10 +5,11 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_KEY_SYSTEM_CONFIGURATION_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_KEY_SYSTEM_CONFIGURATION_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "media/base/eme_constants.h"
|
||||
#include "third_party/blink/public/platform/web_encrypted_media_types.h"
|
||||
#include "third_party/blink/public/platform/web_media_key_system_media_capability.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -20,12 +21,12 @@ struct WebMediaKeySystemConfiguration {
|
||||
};
|
||||
|
||||
WebString label;
|
||||
WebVector<media::EmeInitDataType> init_data_types;
|
||||
WebVector<WebMediaKeySystemMediaCapability> audio_capabilities;
|
||||
WebVector<WebMediaKeySystemMediaCapability> video_capabilities;
|
||||
std::vector<media::EmeInitDataType> init_data_types;
|
||||
std::vector<WebMediaKeySystemMediaCapability> audio_capabilities;
|
||||
std::vector<WebMediaKeySystemMediaCapability> video_capabilities;
|
||||
Requirement distinctive_identifier = Requirement::kOptional;
|
||||
Requirement persistent_state = Requirement::kOptional;
|
||||
WebVector<WebEncryptedMediaSessionType> session_types;
|
||||
std::vector<WebEncryptedMediaSessionType> session_types;
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
|
@ -331,7 +331,7 @@ class WebMediaPlayer {
|
||||
virtual void SetIsEffectivelyFullscreen(WebFullscreenVideoStatus) {}
|
||||
|
||||
virtual void EnabledAudioTracksChanged(
|
||||
const WebVector<TrackId>& enabled_track_ids) {}
|
||||
const std::vector<TrackId>& enabled_track_ids) {}
|
||||
virtual void SelectedVideoTrackChanged(
|
||||
std::optional<TrackId> selected_track_id) {}
|
||||
|
||||
|
@ -5,9 +5,10 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_SOURCE_BUFFER_CLIENT_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_SOURCE_BUFFER_CLIENT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_media_player.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -40,7 +41,7 @@ class WebSourceBufferClient {
|
||||
// media tracks found in the new init segment. The return value is true in
|
||||
// case of success.
|
||||
virtual bool InitializationSegmentReceived(
|
||||
const WebVector<MediaTrackInfo>& tracks) = 0;
|
||||
const std::vector<MediaTrackInfo>& tracks) = 0;
|
||||
|
||||
// Notifies SourceBuffer of parse warning.
|
||||
virtual void NotifyParseWarning(const ParseWarning) = 0;
|
||||
|
@ -26,11 +26,12 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TEXT_INPUT_INFO_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TEXT_INPUT_INFO_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_text_input_mode.h"
|
||||
#include "third_party/blink/public/platform/web_text_input_type.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
#include "ui/base/ime/ime_text_span.h"
|
||||
#include "ui/base/ime/mojom/virtual_keyboard_types.mojom-shared.h"
|
||||
#include "ui/base/ime/text_input_action.h"
|
||||
@ -76,7 +77,7 @@ struct BLINK_PLATFORM_EXPORT WebTextInputInfo {
|
||||
ui::mojom::VirtualKeyboardPolicy::AUTO;
|
||||
|
||||
// The array of ime_text_spans at the current caret position.
|
||||
WebVector<ui::ImeTextSpan> ime_text_spans;
|
||||
std::vector<ui::ImeTextSpan> ime_text_spans;
|
||||
|
||||
bool Equals(const WebTextInputInfo&) const;
|
||||
};
|
||||
|
@ -32,9 +32,9 @@
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user