0

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:
Xianzhu Wang
2025-01-28 17:57:12 -08:00
committed by Chromium LUCI CQ
parent 80c4cf6e5b
commit aece0d42b5
260 changed files with 767 additions and 756 deletions
android_webview/renderer
chrome/renderer
chromecast/renderer
components
content
extensions/renderer
fuchsia_web/webengine/renderer
headless/lib/renderer
pdf
third_party/blink
public
renderer
bindings
controller
core
clipboard
content_capture
css
editing
execution_context
exported
frame
html
inspector
layout
loader
messaging
navigation_api
page
script
timing
workers
modules
platform

@ -47,13 +47,13 @@ AwURLLoaderThrottleProvider::~AwURLLoaderThrottleProvider() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
} }
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
AwURLLoaderThrottleProvider::CreateThrottles( AwURLLoaderThrottleProvider::CreateThrottles(
base::optional_ref<const blink::LocalFrameToken> local_frame_token, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) { const network::ResourceRequest& request) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 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. // Some throttles have already been added in the browser for frame resources.
// Don't add them for frame requests. // Don't add them for frame requests.

@ -30,7 +30,7 @@ class AwURLLoaderThrottleProvider : public blink::URLLoaderThrottleProvider {
// blink::URLLoaderThrottleProvider implementation. // blink::URLLoaderThrottleProvider implementation.
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override; 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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override; const network::ResourceRequest& request) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;

@ -42,7 +42,6 @@
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_string.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_autofill_state.h"
#include "third_party/blink/public/web/web_document.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.h"
@ -68,7 +67,6 @@ using blink::WebInputElement;
using blink::WebLocalFrame; using blink::WebLocalFrame;
using blink::WebSelectElement; using blink::WebSelectElement;
using blink::WebString; using blink::WebString;
using blink::WebVector;
using testing::_; using testing::_;
using testing::ElementsAre; using testing::ElementsAre;
using testing::Field; using testing::Field;
@ -2408,7 +2406,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData) {
WebLocalFrame* frame = GetMainFrame(); WebLocalFrame* frame = GetMainFrame();
ASSERT_NE(nullptr, frame); ASSERT_NE(nullptr, frame);
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms(); std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, forms.size()); ASSERT_EQ(1U, forms.size());
WebInputElement input_element = GetInputElementById("firstname"); WebInputElement input_element = GetInputElementById("firstname");
@ -2472,7 +2470,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData) {
EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[5]); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[5]);
// Check renderer_id. // Check renderer_id.
WebVector<WebFormControlElement> form_control_elements = std::vector<WebFormControlElement> form_control_elements =
forms[0].GetFormControlElements(); forms[0].GetFormControlElements();
for (size_t i = 0; i < fields.size(); ++i) for (size_t i = 0; i < fields.size(); ++i)
EXPECT_EQ(GetFieldRendererId(form_control_elements[i]), EXPECT_EQ(GetFieldRendererId(form_control_elements[i]),
@ -2513,7 +2511,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData_TooManyFields) {
WebLocalFrame* frame = GetMainFrame(); WebLocalFrame* frame = GetMainFrame();
ASSERT_NE(nullptr, frame); ASSERT_NE(nullptr, frame);
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms(); std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, forms.size()); ASSERT_EQ(1U, forms.size());
ASSERT_FALSE(forms.front().GetFormControlElements().empty()); ASSERT_FALSE(forms.front().GetFormControlElements().empty());
@ -2878,7 +2876,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData_Autocomplete) {
<input type=submit name='reply-send' value=Send> <input type=submit name='reply-send' value=Send>
</form>)"); </form>)");
WebVector<WebFormElement> web_forms = GetDocument().GetTopLevelForms(); std::vector<WebFormElement> web_forms = GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, web_forms.size()); ASSERT_EQ(1U, web_forms.size());
WebFormElement web_form = web_forms[0]; WebFormElement web_form = web_forms[0];
@ -4183,7 +4181,7 @@ TEST_F(FormAutofillTest, ThreePartPhone) {
WebLocalFrame* frame = GetMainFrame(); WebLocalFrame* frame = GetMainFrame();
ASSERT_NE(nullptr, frame); ASSERT_NE(nullptr, frame);
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms(); std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, forms.size()); ASSERT_EQ(1U, forms.size());
FormData form = *ExtractFormData(forms[0]); FormData form = *ExtractFormData(forms[0]);
@ -4236,7 +4234,7 @@ TEST_F(FormAutofillTest, MaxLengthFields) {
WebLocalFrame* frame = GetMainFrame(); WebLocalFrame* frame = GetMainFrame();
ASSERT_NE(nullptr, frame); ASSERT_NE(nullptr, frame);
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms(); std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, forms.size()); ASSERT_EQ(1U, forms.size());
FormData form = *ExtractFormData(forms[0]); FormData form = *ExtractFormData(forms[0]);
@ -4427,7 +4425,7 @@ TEST_F(FormAutofillTest, UndoAutofill) {
HasAutofillValue("autofill_select_option_2", HasAutofillValue("autofill_select_option_2",
WebAutofillState::kAutofilled)); WebAutofillState::kAutofilled));
WebVector<WebFormElement> forms = std::vector<WebFormElement> forms =
GetMainFrame()->GetDocument().GetTopLevelForms(); GetMainFrame()->GetDocument().GetTopLevelForms();
EXPECT_EQ(1U, forms.size()); EXPECT_EQ(1U, forms.size());
@ -4614,7 +4612,7 @@ TEST_F(FormAutofillTest, SelectOneAsText) {
frame->GetDocument().GetElementById("country").To<WebSelectElement>(); frame->GetDocument().GetElementById("country").To<WebSelectElement>();
select_element.SetValue(WebString::FromUTF8("AL")); select_element.SetValue(WebString::FromUTF8("AL"));
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms(); std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, forms.size()); ASSERT_EQ(1U, forms.size());
FormData form = *ExtractFormData(forms[0]); 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/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/features.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_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_document.h"
#include "third_party/blink/public/web/web_form_element.h" #include "third_party/blink/public/web/web_form_element.h"
#include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_frame_widget.h"
@ -1319,10 +1318,9 @@ TEST_F(PasswordAutofillAgentTest, IsWebElementVisibleTest) {
LoadHTML(kVisibleFormWithNoUsernameHTML); LoadHTML(kVisibleFormWithNoUsernameHTML);
frame = GetMainFrame(); frame = GetMainFrame();
blink::WebVector<WebFormElement> forms = std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
frame->GetDocument().GetTopLevelForms();
ASSERT_EQ(1u, forms.size()); ASSERT_EQ(1u, forms.size());
blink::WebVector<blink::WebFormControlElement> web_control_elements = std::vector<blink::WebFormControlElement> web_control_elements =
forms[0].GetFormControlElements(); forms[0].GetFormControlElements();
ASSERT_EQ(1u, web_control_elements.size()); ASSERT_EQ(1u, web_control_elements.size());
EXPECT_TRUE( EXPECT_TRUE(
@ -4179,7 +4177,7 @@ TEST_F(PasswordAutofillAgentTest,
// Get the username and password form input elements. // Get the username and password form input elements.
blink::WebDocument document = GetMainFrame()->GetDocument(); blink::WebDocument document = GetMainFrame()->GetDocument();
blink::WebVector<WebFormElement> forms = document.GetTopLevelForms(); std::vector<WebFormElement> forms = document.GetTopLevelForms();
WebFormElement form_element = forms[0]; WebFormElement form_element = forms[0];
std::vector<blink::WebFormControlElement> control_elements = std::vector<blink::WebFormControlElement> control_elements =
form_util::GetOwnedAutofillableFormControls(document, form_element); form_util::GetOwnedAutofillableFormControls(document, form_element);

@ -22,7 +22,6 @@ using blink::WebElement;
using blink::WebFormControlElement; using blink::WebFormControlElement;
using blink::WebFormElement; using blink::WebFormElement;
using blink::WebString; using blink::WebString;
using blink::WebVector;
namespace autofill { namespace autofill {

@ -285,7 +285,6 @@ using blink::WebURL;
using blink::WebURLError; using blink::WebURLError;
using blink::WebURLRequest; using blink::WebURLRequest;
using blink::WebURLResponse; using blink::WebURLResponse;
using blink::WebVector;
using blink::mojom::FetchCacheMode; using blink::mojom::FetchCacheMode;
using content::RenderFrame; using content::RenderFrame;
using content::RenderThread; using content::RenderThread;
@ -318,14 +317,14 @@ std::vector<url::Origin> GetAdditionalPdfInternalPluginAllowedOrigins() {
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
void AppendParams( void AppendParams(
const std::vector<WebPluginMimeType::Param>& additional_params, const std::vector<WebPluginMimeType::Param>& additional_params,
WebVector<WebString>* existing_names, std::vector<WebString>* existing_names,
WebVector<WebString>* existing_values) { std::vector<WebString>* existing_values) {
DCHECK(existing_names->size() == existing_values->size()); DCHECK(existing_names->size() == existing_values->size());
size_t existing_size = existing_names->size(); size_t existing_size = existing_names->size();
size_t total_size = existing_size + additional_params.size(); size_t total_size = existing_size + additional_params.size();
WebVector<WebString> names(total_size); std::vector<WebString> names(total_size);
WebVector<WebString> values(total_size); std::vector<WebString> values(total_size);
for (size_t i = 0; i < existing_size; ++i) { for (size_t i = 0; i < existing_size; ++i) {
names[i] = (*existing_names)[i]; names[i] = (*existing_names)[i];
@ -1859,7 +1858,7 @@ void ChromeContentRendererClient::DidSetUserAgent(
void ChromeContentRendererClient::AppendContentSecurityPolicy( void ChromeContentRendererClient::AppendContentSecurityPolicy(
const blink::WebURL& url, const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) { std::vector<blink::WebContentSecurityPolicyHeader>* csp) {
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE) #if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
#if BUILDFLAG(ENABLE_PDF) #if BUILDFLAG(ENABLE_PDF)
// Don't apply default CSP to PDF renderers. // Don't apply default CSP to PDF renderers.

@ -231,7 +231,7 @@ class ChromeContentRendererClient
void DidSetUserAgent(const std::string& user_agent) override; void DidSetUserAgent(const std::string& user_agent) override;
void AppendContentSecurityPolicy( void AppendContentSecurityPolicy(
const blink::WebURL& url, const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override; std::vector<blink::WebContentSecurityPolicyHeader>* csp) override;
std::unique_ptr<blink::WebLinkPreviewTriggerer> CreateLinkPreviewTriggerer() std::unique_ptr<blink::WebLinkPreviewTriggerer> CreateLinkPreviewTriggerer()
override; override;

@ -8,6 +8,7 @@
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <utility> #include <utility>
#include <vector>
#include "base/functional/bind.h" #include "base/functional/bind.h"
#include "base/values.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.h"
#include "third_party/blink/public/platform/web_crypto_algorithm_params.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_string.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/web_crypto_normalize.h" #include "third_party/blink/public/web/web_crypto_normalize.h"
namespace extensions { namespace extensions {
@ -66,7 +66,7 @@ v8::Local<v8::Object> WebCryptoAlgorithmToV8Value(
if (rsa_hashed_key_gen) { if (rsa_hashed_key_gen) {
builder.Set("modulusLength", rsa_hashed_key_gen->ModulusLengthBits()); 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(); rsa_hashed_key_gen->PublicExponent();
v8::Local<v8::ArrayBuffer> buffer = v8::Local<v8::ArrayBuffer> buffer =
v8::ArrayBuffer::New(isolate, public_exponent.size()); v8::ArrayBuffer::New(isolate, public_exponent.size());

@ -11,7 +11,7 @@
namespace { namespace {
std::vector<std::string> WebStringVectorToStl( 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; std::vector<std::string> stl_vector;
for (const blink::WebString& web_string : web_vector) for (const blink::WebString& web_string : web_vector)
stl_vector.push_back(web_string.Utf8()); stl_vector.push_back(web_string.Utf8());

@ -159,13 +159,13 @@ URLLoaderThrottleProviderImpl::Clone() {
main_thread_task_runner_, base::PassKey<URLLoaderThrottleProviderImpl>()); main_thread_task_runner_, base::PassKey<URLLoaderThrottleProviderImpl>());
} }
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
URLLoaderThrottleProviderImpl::CreateThrottles( URLLoaderThrottleProviderImpl::CreateThrottles(
base::optional_ref<const blink::LocalFrameToken> local_frame_token, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) { const network::ResourceRequest& request) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 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. // Some throttles have already been added in the browser for frame resources.
// Don't add them for frame requests. // Don't add them for frame requests.

@ -57,7 +57,7 @@ class URLLoaderThrottleProviderImpl : public blink::URLLoaderThrottleProvider {
// blink::URLLoaderThrottleProvider implementation. // blink::URLLoaderThrottleProvider implementation.
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override; 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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override; const network::ResourceRequest& request) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;

@ -40,13 +40,13 @@ CastURLLoaderThrottleProvider::Clone() {
return base::WrapUnique(new CastURLLoaderThrottleProvider(*this)); return base::WrapUnique(new CastURLLoaderThrottleProvider(*this));
} }
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
CastURLLoaderThrottleProvider::CreateThrottles( CastURLLoaderThrottleProvider::CreateThrottles(
base::optional_ref<const blink::LocalFrameToken> local_frame_token, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) { const network::ResourceRequest& request) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 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()) { if (cast_activity_url_filter_manager_ && local_frame_token.has_value()) {
auto* activity_url_filter = cast_activity_url_filter_manager_ auto* activity_url_filter = cast_activity_url_filter_manager_

@ -27,7 +27,7 @@ class CastURLLoaderThrottleProvider : public blink::URLLoaderThrottleProvider {
// blink::URLLoaderThrottleProvider implementation: // blink::URLLoaderThrottleProvider implementation:
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override; 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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override; const network::ResourceRequest& request) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;

@ -716,8 +716,7 @@ TEST_F(AutofillAgentTest, PreviewThenClear) {
</form> </form>
)"); )");
blink::WebVector<blink::WebFormElement> forms = std::vector<blink::WebFormElement> forms = GetDocument().GetTopLevelForms();
GetDocument().GetTopLevelForms();
ASSERT_EQ(1U, forms.size()); ASSERT_EQ(1U, forms.size());
FormData form = *form_util::ExtractFormData( FormData form = *form_util::ExtractFormData(
forms[0].GetDocument(), forms[0], forms[0].GetDocument(), forms[0],
@ -1246,7 +1245,7 @@ TEST_P(AutofillAgentSubmissionTest,
kCallTimerStateDummy); kCallTimerStateDummy);
ASSERT_TRUE(form.has_value()); ASSERT_TRUE(form.has_value());
blink::WebVector<blink::WebFormControlElement> field_elements = std::vector<blink::WebFormControlElement> field_elements =
form_element.GetFormControlElements(); form_element.GetFormControlElements();
for (const blink::WebFormControlElement& field_element : field_elements) { for (const blink::WebFormControlElement& field_element : field_elements) {

@ -99,7 +99,7 @@ class DomLabelTest : public content::RenderViewTest,
std::vector<FormData> ExtractFormDatas() { std::vector<FormData> ExtractFormDatas() {
blink::WebDocument document = GetMainFrame()->GetDocument(); blink::WebDocument document = GetMainFrame()->GetDocument();
// `GetTopLevelForms()` returns forms in DOM order. // `GetTopLevelForms()` returns forms in DOM order.
blink::WebVector<blink::WebFormElement> form_elements = std::vector<blink::WebFormElement> form_elements =
document.GetTopLevelForms(); document.GetTopLevelForms();
// Add a null WebFormElement to extract unowned fields into a separate form. // Add a null WebFormElement to extract unowned fields into a separate form.
form_elements.emplace_back(); form_elements.emplace_back();

@ -15,7 +15,6 @@
#include "components/autofill/core/common/form_field_data.h" #include "components/autofill/core/common/form_field_data.h"
#include "third_party/blink/public/common/features.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_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_autofill_client.h"
#include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element_collection.h" #include "third_party/blink/public/web/web_element_collection.h"
@ -33,7 +32,6 @@ using blink::WebInputElement;
using blink::WebLabelElement; using blink::WebLabelElement;
using blink::WebLocalFrame; using blink::WebLocalFrame;
using blink::WebString; using blink::WebString;
using blink::WebVector;
using blink::mojom::GenericIssueErrorType; using blink::mojom::GenericIssueErrorType;
namespace autofill::form_issues { namespace autofill::form_issues {
@ -113,12 +111,12 @@ int GetShadowHostDOMNodeId(const WebFormControlElement& element) {
} }
void MaybeAppendDuplicateIdForInputDevtoolsIssue( void MaybeAppendDuplicateIdForInputDevtoolsIssue(
const WebVector<WebFormControlElement>& elements, const std::vector<WebFormControlElement>& elements,
std::vector<FormIssue>& form_issues) { std::vector<FormIssue>& form_issues) {
const WebString& id_attr = GetWebString<kId>(); const WebString& id_attr = GetWebString<kId>();
// Create copies of |elements| with ids that can be modified // 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()); elements_with_id_attr.reserve(elements.size());
for (const auto& element : elements) { for (const auto& element : elements) {
if (IsAutofillableElement(element) && !element.GetIdAttribute().IsEmpty()) { if (IsAutofillableElement(element) && !element.GetIdAttribute().IsEmpty()) {
@ -221,8 +219,9 @@ void MaybeAppendInputAssignedAutocompleteValueToIdOrNameAttributesDevtoolsIssue(
} }
} }
void AppendFormIssuesInternal(const WebVector<WebFormControlElement>& elements, void AppendFormIssuesInternal(
std::vector<FormIssue>& form_issues) { const std::vector<WebFormControlElement>& elements,
std::vector<FormIssue>& form_issues) {
if (elements.size() == 0) { if (elements.size() == 0) {
return; 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 // and returns a vector that is the union of `form_issues` and the new issues
// found. // found.
std::vector<FormIssue> GetFormIssues( std::vector<FormIssue> GetFormIssues(
const blink::WebVector<blink::WebFormControlElement>& control_elements, const std::vector<blink::WebFormControlElement>& control_elements,
std::vector<FormIssue> form_issues) { std::vector<FormIssue> form_issues) {
AppendFormIssuesInternal(control_elements, form_issues); AppendFormIssuesInternal(control_elements, form_issues);
return form_issues; return form_issues;
@ -343,7 +342,7 @@ void MaybeEmitFormIssuesToDevtools(blink::WebLocalFrame& web_local_frame,
} }
std::vector<FormIssue> GetFormIssuesForTesting( // IN-TEST 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) { std::vector<FormIssue> form_issues) {
return GetFormIssues(control_elements, form_issues); return GetFormIssues(control_elements, form_issues);
} }

@ -10,7 +10,6 @@
#include "components/autofill/core/common/form_field_data.h" #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/mojom/devtools/inspector_issue.mojom.h"
#include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
class WebFormControlElement; class WebFormControlElement;
@ -49,7 +48,7 @@ void MaybeEmitFormIssuesToDevtools(blink::WebLocalFrame& web_local_frame,
base::span<const FormData> forms); base::span<const FormData> forms);
std::vector<FormIssue> GetFormIssuesForTesting( 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> form_issues);
std::vector<FormIssue> CheckForLabelsWithIncorrectForAttributeForTesting( std::vector<FormIssue> CheckForLabelsWithIncorrectForAttributeForTesting(

@ -51,7 +51,6 @@
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "third_party/blink/public/platform/url_conversion.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_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_autofill_state.h"
#include "third_party/blink/public/web/web_document.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.h"
@ -82,7 +81,6 @@ using blink::WebNode;
using blink::WebOptionElement; using blink::WebOptionElement;
using blink::WebSelectElement; using blink::WebSelectElement;
using blink::WebString; using blink::WebString;
using blink::WebVector;
namespace autofill::form_util { namespace autofill::form_util {
@ -1765,7 +1763,7 @@ uint64_t GetMaxLength(const WebFormControlElement& element) {
// For more details, see the documentation of `SelectOption`. // For more details, see the documentation of `SelectOption`.
std::vector<SelectOption> GetSelectOptions( std::vector<SelectOption> GetSelectOptions(
const WebSelectElement& select_element) { 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 // Constrain the maximum list length to prevent a malicious site from DOS'ing
// the browser, without entirely breaking autocomplete for some extreme // 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) { auto to_string = [](WebString s) {
return s.Utf16().substr(0, kMaxStringLength); return s.Utf16().substr(0, kMaxStringLength);
}; };
WebVector<WebOptionElement> option_elements = std::vector<WebOptionElement> option_elements =
element.FilteredDataListOptions(); element.FilteredDataListOptions();
std::vector<SelectOption> options; std::vector<SelectOption> options;
options.reserve(std::min(option_elements.size(), kMaxListSize)); options.reserve(std::min(option_elements.size(), kMaxListSize));
@ -2852,14 +2850,14 @@ std::string ExtractFinalCheckoutAmountFromDom(
std::string_view price_regex, std::string_view price_regex,
std::string_view label_regex, std::string_view label_regex,
size_t number_of_ancestor_levels_to_search) { size_t number_of_ancestor_levels_to_search) {
WebVector<WebNode> price_nodes = std::vector<WebNode> price_nodes =
document.FindAllTextNodesMatchingRegex(WebString::FromUTF8(price_regex)); document.FindAllTextNodesMatchingRegex(WebString::FromUTF8(price_regex));
if (price_nodes.empty()) { if (price_nodes.empty()) {
return ""; return "";
} }
WebVector<WebNode> label_nodes = std::vector<WebNode> label_nodes =
document.FindAllTextNodesMatchingRegex(WebString::FromUTF8(label_regex)); document.FindAllTextNodesMatchingRegex(WebString::FromUTF8(label_regex));
if (label_nodes.empty()) { if (label_nodes.empty()) {

@ -24,7 +24,6 @@
#include "components/autofill/core/common/form_field_data.h" #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/mojom/autofill_types.mojom-shared.h"
#include "components/autofill/core/common/unique_ids.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_autofill_state.h"
#include "third_party/blink/public/web/web_element_collection.h" #include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_form_control_element.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 "components/autofill/content/renderer/form_autofill_util.h"
#include <vector>
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/metrics/field_trial.h" #include "base/metrics/field_trial.h"
#include "base/strings/strcat.h" #include "base/strings/strcat.h"
@ -29,7 +31,6 @@
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_string.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_document.h"
#include "third_party/blink/public/web/web_element.h" #include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_element_collection.h" #include "third_party/blink/public/web/web_element_collection.h"
@ -54,7 +55,6 @@ using ::blink::WebInputElement;
using ::blink::WebLocalFrame; using ::blink::WebLocalFrame;
using ::blink::WebNode; using ::blink::WebNode;
using ::blink::WebString; using ::blink::WebString;
using ::blink::WebVector;
using ::testing::_; using ::testing::_;
using ::testing::AllOf; using ::testing::AllOf;
using ::testing::ElementsAre; using ::testing::ElementsAre;
@ -433,7 +433,7 @@ TEST_F(FormAutofillUtilsTest, FindChildTextSkipElementTest) {
SCOPED_TRACE(test_case.description); SCOPED_TRACE(test_case.description);
LoadHTML(test_case.html); LoadHTML(test_case.html);
WebElement target = GetElementById(GetDocument(), "target"); WebElement target = GetElementById(GetDocument(), "target");
WebVector<WebElement> web_to_skip = std::vector<WebElement> web_to_skip =
GetDocument().QuerySelectorAll("div[class='skip']"); GetDocument().QuerySelectorAll("div[class='skip']");
std::set<WebNode> to_skip; std::set<WebNode> to_skip;
for (const WebElement& element : web_to_skip) { for (const WebElement& element : web_to_skip) {
@ -703,7 +703,7 @@ TEST_F(FormAutofillUtilsTest, IsFocusable) {
TEST_F(FormAutofillUtilsTest, FindFormByUniqueId) { TEST_F(FormAutofillUtilsTest, FindFormByUniqueId) {
LoadHTML("<body><form id='form1'></form><form id='form2'></form></body>"); 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) for (const auto& form : forms)
EXPECT_EQ(form, GetFormByRendererId(GetFormRendererId(form))); EXPECT_EQ(form, GetFormByRendererId(GetFormRendererId(form)));

@ -37,7 +37,6 @@ using blink::WebLabelElement;
using blink::WebLocalFrame; using blink::WebLocalFrame;
using blink::WebNode; using blink::WebNode;
using blink::WebString; using blink::WebString;
using blink::WebVector;
namespace autofill { namespace autofill {

@ -64,7 +64,6 @@
#include "third_party/blink/public/common/features.h" #include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/input/web_input_event.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_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_autofill_client.h"
#include "third_party/blink/public/web/web_document.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.h"
@ -92,7 +91,6 @@ using blink::WebNode;
using blink::WebSecurityOrigin; using blink::WebSecurityOrigin;
using blink::WebString; using blink::WebString;
using blink::WebURL; using blink::WebURL;
using blink::WebVector;
using blink::WebView; using blink::WebView;
using password_manager::util::IsRendererRecognizedCredentialForm; using password_manager::util::IsRendererRecognizedCredentialForm;
@ -1409,7 +1407,7 @@ void PasswordAutofillAgent::UserGestureObserved() {
} }
void PasswordAutofillAgent::AnnotateFormsAndFieldsWithSignatures( void PasswordAutofillAgent::AnnotateFormsAndFieldsWithSignatures(
WebVector<WebFormElement>& forms, std::vector<WebFormElement>& forms,
const SynchronousFormCache& form_cache) { const SynchronousFormCache& form_cache) {
if (!render_frame()) { if (!render_frame()) {
return; return;
@ -1482,7 +1480,7 @@ void PasswordAutofillAgent::SendPasswordForms(
return; return;
} }
WebVector<WebFormElement> forms = doc.GetTopLevelForms(); std::vector<WebFormElement> forms = doc.GetTopLevelForms();
if (IsShowAutofillSignaturesEnabled()) if (IsShowAutofillSignaturesEnabled())
AnnotateFormsAndFieldsWithSignatures(forms, form_cache); AnnotateFormsAndFieldsWithSignatures(forms, form_cache);

@ -431,7 +431,7 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
// signatures as HTML attributes. Used by // signatures as HTML attributes. Used by
// chrome://flags/#enable-show-autofill-signatures only. // chrome://flags/#enable-show-autofill-signatures only.
void AnnotateFormsAndFieldsWithSignatures( void AnnotateFormsAndFieldsWithSignatures(
blink::WebVector<blink::WebFormElement>& forms, std::vector<blink::WebFormElement>& forms,
const SynchronousFormCache& form_cache); const SynchronousFormCache& form_cache);
// Scans the given frame for password forms and sends them up to the browser. // 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "components/autofill/content/renderer/password_form_conversion_utils.h"
#include <stddef.h> #include <stddef.h>
#include <memory> #include <memory>
#include <vector>
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "components/autofill/content/renderer/password_form_conversion_utils.h"
#include "content/public/test/render_view_test.h" #include "content/public/test/render_view_test.h"
#include "google_apis/gaia/gaia_urls.h" #include "google_apis/gaia/gaia_urls.h"
#include "testing/gtest/include/gtest/gtest.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_document.h"
#include "third_party/blink/public/web/web_form_element.h" #include "third_party/blink/public/web/web_form_element.h"
#include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame.h"
using blink::WebFormElement; using blink::WebFormElement;
using blink::WebLocalFrame; using blink::WebLocalFrame;
using blink::WebVector;
namespace autofill { namespace autofill {
namespace { namespace {
@ -114,7 +115,7 @@ class PasswordFormConversionUtilsTest : public content::RenderViewTest {
WebLocalFrame* frame = GetMainFrame(); WebLocalFrame* frame = GetMainFrame();
ASSERT_TRUE(frame); ASSERT_TRUE(frame);
WebVector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms(); std::vector<WebFormElement> forms = frame->GetDocument().GetTopLevelForms();
ASSERT_LE(1U, forms.size()); ASSERT_LE(1U, forms.size());
*form = forms[0]; *form = forms[0];

@ -7,6 +7,7 @@
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
#include <utility> #include <utility>
#include <vector>
#include "base/auto_reset.h" #include "base/auto_reset.h"
#include "base/check_op.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/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/features.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_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_document.h"
#include "third_party/blink/public/web/web_form_control_element.h" #include "third_party/blink/public/web/web_form_control_element.h"
#include "third_party/blink/public/web/web_form_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 "components/cast_receiver/renderer/wrapping_url_loader_throttle_provider.h"
#include <vector>
#include "components/cast_receiver/renderer/url_rewrite_rules_provider.h" #include "components/cast_receiver/renderer/url_rewrite_rules_provider.h"
#include "components/media_control/renderer/media_playback_options.h" #include "components/media_control/renderer/media_playback_options.h"
#include "components/on_load_script_injector/renderer/on_load_script_injector.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 "services/network/public/cpp/resource_request.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.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/url_loader_throttle_provider.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace cast_receiver { namespace cast_receiver {
@ -39,13 +40,13 @@ WrappingURLLoaderThrottleProvider::Clone() {
wrapped_provider_ ? wrapped_provider_->Clone() : nullptr, *client_); wrapped_provider_ ? wrapped_provider_->Clone() : nullptr, *client_);
} }
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
WrappingURLLoaderThrottleProvider::CreateThrottles( WrappingURLLoaderThrottleProvider::CreateThrottles(
base::optional_ref<const blink::LocalFrameToken> local_frame_token, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) { const network::ResourceRequest& request) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 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_) { if (wrapped_provider_) {
throttles = wrapped_provider_->CreateThrottles(local_frame_token, request); throttles = wrapped_provider_->CreateThrottles(local_frame_token, request);
} }

@ -7,12 +7,12 @@
#include <memory> #include <memory>
#include <string_view> #include <string_view>
#include <vector>
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/functional/callback_forward.h" #include "base/functional/callback_forward.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
#include "third_party/blink/public/platform/url_loader_throttle_provider.h" #include "third_party/blink/public/platform/url_loader_throttle_provider.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace network { namespace network {
struct ResourceRequest; struct ResourceRequest;
@ -57,7 +57,7 @@ class WrappingURLLoaderThrottleProvider
// blink::URLLoaderThrottleProvider implementation. // blink::URLLoaderThrottleProvider implementation.
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override; 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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override; const network::ResourceRequest& request) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;

@ -43,11 +43,11 @@ class ContentCaptureSender : public content::RenderFrameObserver,
// blink::WebContentCaptureClient: // blink::WebContentCaptureClient:
base::TimeDelta GetTaskInitialDelay() const override; 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; bool first_data) override;
void DidUpdateContent( void DidUpdateContent(
const blink::WebVector<blink::WebContentHolder>& data) override; const std::vector<blink::WebContentHolder>& data) override;
void DidRemoveContent(blink::WebVector<int64_t> data) override; void DidRemoveContent(std::vector<int64_t> data) override;
// mojom::ContentCaptureSender: // mojom::ContentCaptureSender:
void StartCapture() override; void StartCapture() override;
@ -58,7 +58,7 @@ class ContentCaptureSender : public content::RenderFrameObserver,
private: private:
void FillContentCaptureData( void FillContentCaptureData(
const blink::WebVector<blink::WebContentHolder>& node_holders, const std::vector<blink::WebContentHolder>& node_holders,
ContentCaptureData* data, ContentCaptureData* data,
bool set_url); bool set_url);
const mojo::AssociatedRemote<mojom::ContentCaptureReceiver>& const mojo::AssociatedRemote<mojom::ContentCaptureReceiver>&

@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector>
#include "base/check_op.h" #include "base/check_op.h"
#include "base/values.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_security_origin.h"
#include "third_party/blink/public/platform/web_string.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_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_associated_url_loader.h"
#include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_dom_message_event.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) { const std::vector<gfx::Rect>& tickmarks) {
blink::WebLocalFrame* frame = GetFrame(); blink::WebLocalFrame* frame = GetFrame();
if (frame) { if (frame) {
frame->SetTickmarks(blink::WebElement(), frame->SetTickmarks(blink::WebElement(), std::vector<gfx::Rect>(tickmarks));
blink::WebVector<gfx::Rect>(tickmarks));
} }
} }

@ -50,7 +50,6 @@ using blink::WebPluginContainer;
using blink::WebString; using blink::WebString;
using blink::WebURLError; using blink::WebURLError;
using blink::WebURLResponse; using blink::WebURLResponse;
using blink::WebVector;
using blink::WebView; using blink::WebView;
using blink::web_pref::WebPreferences; using blink::web_pref::WebPreferences;

@ -14,6 +14,7 @@
#include <memory> #include <memory>
#include <string_view> #include <string_view>
#include <utility> #include <utility>
#include <vector>
#include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr.h"
#include "base/path_service.h" #include "base/path_service.h"
@ -28,7 +29,6 @@
#include "components/spellcheck/renderer/spellcheck_provider_test.h" #include "components/spellcheck/renderer/spellcheck_provider_test.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_string.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" #include "third_party/blink/public/web/web_text_checking_result.h"
namespace { namespace {
@ -109,7 +109,7 @@ class MultilingualSpellCheckTest : public testing::Test {
void ExpectSpellCheckParagraphResults( void ExpectSpellCheckParagraphResults(
const std::u16string& input, const std::u16string& input,
const std::vector<SpellCheckResult>& expected) { const std::vector<SpellCheckResult>& expected) {
blink::WebVector<blink::WebTextCheckingResult> results; std::vector<blink::WebTextCheckingResult> results;
spellcheck_->SpellCheckParagraph(input, provider_->GetSpellCheckHost(), spellcheck_->SpellCheckParagraph(input, provider_->GetSpellCheckHost(),
&results); &results);
@ -247,7 +247,7 @@ TEST_F(MultilingualSpellCheckTest, MultilingualSpellCheckSuggestions) {
}); });
for (size_t i = 0; i < std::size(kTestCases); ++i) { 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_start;
size_t misspelling_length; size_t misspelling_length;
static_cast<blink::WebTextCheckClient*>(provider()) static_cast<blink::WebTextCheckClient*>(provider())

@ -113,7 +113,7 @@ class SpellCheckProvider : public content::RenderFrameObserver,
const blink::WebString& text, const blink::WebString& text,
size_t& offset, size_t& offset,
size_t& length, size_t& length,
blink::WebVector<blink::WebString>* optional_suggestions) override; std::vector<blink::WebString>* optional_suggestions) override;
void RequestCheckingOfText( void RequestCheckingOfText(
const blink::WebString& text, const blink::WebString& text,
std::unique_ptr<blink::WebTextCheckingCompletion> completion) override; 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 // The last text sent to the browser process for spellchecking, and its
// spellcheck results and WebTextCheckCompletions identifier. // spellcheck results and WebTextCheckCompletions identifier.
std::u16string last_request_; std::u16string last_request_;
blink::WebVector<blink::WebTextCheckingResult> last_results_; std::vector<blink::WebTextCheckingResult> last_results_;
int last_identifier_; int last_identifier_;
// Weak pointer to shared (per renderer) spellcheck data. // Weak pointer to shared (per renderer) spellcheck data.

@ -47,7 +47,7 @@ FakeTextCheckingCompletion::FakeTextCheckingCompletion(
FakeTextCheckingCompletion::~FakeTextCheckingCompletion() = default; FakeTextCheckingCompletion::~FakeTextCheckingCompletion() = default;
void FakeTextCheckingCompletion::DidFinishCheckingText( void FakeTextCheckingCompletion::DidFinishCheckingText(
const blink::WebVector<blink::WebTextCheckingResult>& results) { const std::vector<blink::WebTextCheckingResult>& results) {
++result_->completion_count_; ++result_->completion_count_;
result_->results_ = results; result_->results_ = results;
} }
@ -208,7 +208,7 @@ void TestingSpellCheckProvider::DisconnectSessionBridge() {
void TestingSpellCheckProvider::SetLastResults( void TestingSpellCheckProvider::SetLastResults(
const std::u16string last_request, const std::u16string last_request,
blink::WebVector<blink::WebTextCheckingResult>& last_results) { std::vector<blink::WebTextCheckingResult>& last_results) {
last_request_ = last_request; last_request_ = last_request;
last_results_ = last_results; last_results_ = last_results;
} }

@ -18,14 +18,13 @@
#include "components/spellcheck/spellcheck_buildflags.h" #include "components/spellcheck/spellcheck_buildflags.h"
#include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/receiver.h"
#include "testing/gtest/include/gtest/gtest.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_completion.h"
#include "third_party/blink/public/web/web_text_checking_result.h" #include "third_party/blink/public/web/web_text_checking_result.h"
struct FakeTextCheckingResult { struct FakeTextCheckingResult {
size_t completion_count_ = 0; size_t completion_count_ = 0;
size_t cancellation_count_ = 0; size_t cancellation_count_ = 0;
blink::WebVector<blink::WebTextCheckingResult> results_; std::vector<blink::WebTextCheckingResult> results_;
explicit FakeTextCheckingResult(); explicit FakeTextCheckingResult();
~FakeTextCheckingResult(); ~FakeTextCheckingResult();
@ -38,7 +37,7 @@ class FakeTextCheckingCompletion : public blink::WebTextCheckingCompletion {
~FakeTextCheckingCompletion() override; ~FakeTextCheckingCompletion() override;
void DidFinishCheckingText( void DidFinishCheckingText(
const blink::WebVector<blink::WebTextCheckingResult>& results) override; const std::vector<blink::WebTextCheckingResult>& results) override;
void DidCancelCheckingText() override; void DidCancelCheckingText() override;
raw_ptr<FakeTextCheckingResult> result_; raw_ptr<FakeTextCheckingResult> result_;
@ -87,9 +86,8 @@ class TestingSpellCheckProvider : public SpellCheckProvider,
const std::u16string& text, const std::u16string& text,
std::unique_ptr<blink::WebTextCheckingCompletion> completion); std::unique_ptr<blink::WebTextCheckingCompletion> completion);
void SetLastResults( void SetLastResults(const std::u16string last_request,
const std::u16string last_request, std::vector<blink::WebTextCheckingResult>& last_results);
blink::WebVector<blink::WebTextCheckingResult>& last_results);
bool SatisfyRequestFromCache(const std::u16string& text, bool SatisfyRequestFromCache(const std::u16string& text,
blink::WebTextCheckingCompletion* completion); blink::WebTextCheckingCompletion* completion);

@ -9,6 +9,7 @@
#include <array> #include <array>
#include <memory> #include <memory>
#include <utility> #include <utility>
#include <vector>
#include "base/containers/contains.h" #include "base/containers/contains.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
@ -27,7 +28,6 @@
#include "components/spellcheck/renderer/spellcheck_language.h" #include "components/spellcheck/renderer/spellcheck_language.h"
#include "components/spellcheck/renderer/spellcheck_provider_test.h" #include "components/spellcheck/renderer/spellcheck_provider_test.h"
#include "testing/gtest/include/gtest/gtest.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_completion.h"
#include "third_party/blink/public/web/web_text_checking_result.h" #include "third_party/blink/public/web/web_text_checking_result.h"
@ -114,7 +114,7 @@ class SpellCheckTest : public testing::Test {
protected: protected:
void TestSpellCheckParagraph(const std::u16string& input, void TestSpellCheckParagraph(const std::u16string& input,
const std::vector<SpellCheckResult>& expected) { const std::vector<SpellCheckResult>& expected) {
blink::WebVector<blink::WebTextCheckingResult> results; std::vector<blink::WebTextCheckingResult> results;
spell_check()->SpellCheckParagraph(input, provider_.GetSpellCheckHost(), spell_check()->SpellCheckParagraph(input, provider_.GetSpellCheckHost(),
&results); &results);
@ -139,7 +139,7 @@ class SpellCheckTest : public testing::Test {
struct MockTextCheckingResult { struct MockTextCheckingResult {
size_t completion_count_ = 0; size_t completion_count_ = 0;
blink::WebVector<blink::WebTextCheckingResult> last_results_; std::vector<blink::WebTextCheckingResult> last_results_;
}; };
// A fake completion object for verification. // A fake completion object for verification.
@ -149,7 +149,7 @@ class MockTextCheckingCompletion : public blink::WebTextCheckingCompletion {
: result_(result) {} : result_(result) {}
void DidFinishCheckingText( void DidFinishCheckingText(
const blink::WebVector<blink::WebTextCheckingResult>& results) override { const std::vector<blink::WebTextCheckingResult>& results) override {
result_->completion_count_++; result_->completion_count_++;
result_->last_results_ = results; result_->last_results_ = results;
} }
@ -1256,7 +1256,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResultsKeepsMarkers) {
std::vector<SpellCheckResult> spellcheck_results; std::vector<SpellCheckResult> spellcheck_results;
spellcheck_results.push_back( spellcheck_results.push_back(
SpellCheckResult(SpellCheckResult::SPELLING, 0, 2, std::u16string())); SpellCheckResult(SpellCheckResult::SPELLING, 0, 2, std::u16string()));
blink::WebVector<blink::WebTextCheckingResult> textcheck_results; std::vector<blink::WebTextCheckingResult> textcheck_results;
spell_check()->CreateTextCheckingResults( spell_check()->CreateTextCheckingResults(
SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0, SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0,
text, spellcheck_results, &textcheck_results); text, spellcheck_results, &textcheck_results);
@ -1274,7 +1274,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResultsAddsGrammarMarkers) {
std::vector<SpellCheckResult> spellcheck_results; std::vector<SpellCheckResult> spellcheck_results;
spellcheck_results.push_back( spellcheck_results.push_back(
SpellCheckResult(SpellCheckResult::SPELLING, 7, 4, std::u16string())); SpellCheckResult(SpellCheckResult::SPELLING, 7, 4, std::u16string()));
blink::WebVector<blink::WebTextCheckingResult> textcheck_results; std::vector<blink::WebTextCheckingResult> textcheck_results;
spell_check()->CreateTextCheckingResults( spell_check()->CreateTextCheckingResults(
SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0, SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0,
text, spellcheck_results, &textcheck_results); text, spellcheck_results, &textcheck_results);
@ -1348,7 +1348,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResultsKeepsTypographicalApostrophe) {
SpellCheckResult(SpellCheckResult::SPELLING, 6, 6, SpellCheckResult(SpellCheckResult::SPELLING, 6, 6,
std::vector<std::u16string>({u"have", u"haven't"}))); std::vector<std::u16string>({u"have", u"haven't"})));
blink::WebVector<blink::WebTextCheckingResult> textcheck_results; std::vector<blink::WebTextCheckingResult> textcheck_results;
spell_check()->CreateTextCheckingResults( spell_check()->CreateTextCheckingResults(
SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0, SpellCheck::USE_HUNSPELL_FOR_GRAMMAR, provider_.GetSpellCheckHost(), 0,
text, spellcheck_results, &textcheck_results); text, spellcheck_results, &textcheck_results);

@ -52,7 +52,6 @@ using blink::WebLanguageDetectionDetails;
using blink::WebLocalFrame; using blink::WebLocalFrame;
using blink::WebScriptSource; using blink::WebScriptSource;
using blink::WebString; using blink::WebString;
using blink::WebVector;
namespace { namespace {

@ -41,7 +41,7 @@ void AddInstallIcon(const WebElement& link,
mojom::WebPageIconInfoPtr icon_info(mojom::WebPageIconInfo::New()); mojom::WebPageIconInfoPtr icon_info(mojom::WebPageIconInfo::New());
if (link.HasAttribute("sizes")) { if (link.HasAttribute("sizes")) {
blink::WebVector<gfx::Size> icon_sizes = std::vector<gfx::Size> icon_sizes =
blink::WebIconSizesParser::ParseIconSizes(link.GetAttribute("sizes")); blink::WebIconSizesParser::ParseIconSizes(link.GetAttribute("sizes"));
if (icon_sizes.size() == 1 && icon_sizes[0].width() != 0 && if (icon_sizes.size() == 1 && icon_sizes[0].width() != 0 &&
icon_sizes[0].height() == icon_sizes[0].width()) { icon_sizes[0].height() == icon_sizes[0].width()) {

@ -314,7 +314,7 @@ Status DeriveKey(const blink::WebCryptoAlgorithm& algorithm,
} }
bool SerializeKeyForClone(const blink::WebCryptoKey& key, bool SerializeKeyForClone(const blink::WebCryptoKey& key,
blink::WebVector<uint8_t>* key_data) { std::vector<uint8_t>* key_data) {
const AlgorithmImplementation* impl = nullptr; const AlgorithmImplementation* impl = nullptr;
Status status = GetAlgorithmImplementation(key.Algorithm().Id(), &impl); Status status = GetAlgorithmImplementation(key.Algorithm().Id(), &impl);
if (status.IsError()) if (status.IsError())

@ -115,7 +115,7 @@ Status DeriveKey(const blink::WebCryptoAlgorithm& algorithm,
blink::WebCryptoKey* derived_key); blink::WebCryptoKey* derived_key);
bool SerializeKeyForClone(const blink::WebCryptoKey& 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, bool DeserializeKeyForClone(const blink::WebCryptoKeyAlgorithm& algorithm,
blink::WebCryptoKeyType type, blink::WebCryptoKeyType type,

@ -93,7 +93,7 @@ Status AlgorithmImplementation::ExportKey(blink::WebCryptoKeyFormat format,
Status AlgorithmImplementation::SerializeKeyForClone( Status AlgorithmImplementation::SerializeKeyForClone(
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<uint8_t>* key_data) const { std::vector<uint8_t>* key_data) const {
switch (key.GetType()) { switch (key.GetType()) {
case blink::kWebCryptoKeyTypeSecret: case blink::kWebCryptoKeyTypeSecret:
*key_data = GetSymmetricKeyData(key); *key_data = GetSymmetricKeyData(key);

@ -161,7 +161,7 @@ class AlgorithmImplementation {
// Note that SerializeKeyForClone() is not virtual because all // Note that SerializeKeyForClone() is not virtual because all
// implementations end up doing the same thing. // implementations end up doing the same thing.
Status SerializeKeyForClone(const blink::WebCryptoKey& key, 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). // Deserializes key data from Blink (used for structured cloning).
// //

@ -61,7 +61,7 @@ Status CommonEncryptDecrypt(InitFunc init_func,
return Status::OperationError(); return Status::OperationError();
} }
const blink::WebVector<uint8_t>& label = const std::vector<uint8_t>& label =
algorithm.RsaOaepParams()->OptionalLabel(); algorithm.RsaOaepParams()->OptionalLabel();
if (label.size()) { if (label.size()) {

@ -178,7 +178,7 @@ struct BaseState {
struct EncryptState : public BaseState { struct EncryptState : public BaseState {
EncryptState(const blink::WebCryptoAlgorithm& algorithm, EncryptState(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
const blink::WebCryptoResult& result, const blink::WebCryptoResult& result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: BaseState(result, std::move(task_runner)), : BaseState(result, std::move(task_runner)),
@ -188,7 +188,7 @@ struct EncryptState : public BaseState {
const blink::WebCryptoAlgorithm algorithm; const blink::WebCryptoAlgorithm algorithm;
const blink::WebCryptoKey key; const blink::WebCryptoKey key;
const blink::WebVector<unsigned char> data; const std::vector<unsigned char> data;
std::vector<uint8_t> buffer; std::vector<uint8_t> buffer;
}; };
@ -216,7 +216,7 @@ struct GenerateKeyState : public BaseState {
struct ImportKeyState : public BaseState { struct ImportKeyState : public BaseState {
ImportKeyState(blink::WebCryptoKeyFormat format, ImportKeyState(blink::WebCryptoKeyFormat format,
blink::WebVector<unsigned char> key_data, std::vector<unsigned char> key_data,
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
bool extractable, bool extractable,
blink::WebCryptoKeyUsageMask usages, blink::WebCryptoKeyUsageMask usages,
@ -230,7 +230,7 @@ struct ImportKeyState : public BaseState {
usages(usages) {} usages(usages) {}
const blink::WebCryptoKeyFormat format; const blink::WebCryptoKeyFormat format;
const blink::WebVector<unsigned char> key_data; const std::vector<unsigned char> key_data;
const blink::WebCryptoAlgorithm algorithm; const blink::WebCryptoAlgorithm algorithm;
const bool extractable; const bool extractable;
const blink::WebCryptoKeyUsageMask usages; const blink::WebCryptoKeyUsageMask usages;
@ -256,8 +256,8 @@ typedef EncryptState SignState;
struct VerifySignatureState : public BaseState { struct VerifySignatureState : public BaseState {
VerifySignatureState(const blink::WebCryptoAlgorithm& algorithm, VerifySignatureState(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> signature, std::vector<unsigned char> signature,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
const blink::WebCryptoResult& result, const blink::WebCryptoResult& result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: BaseState(result, std::move(task_runner)), : BaseState(result, std::move(task_runner)),
@ -269,8 +269,8 @@ struct VerifySignatureState : public BaseState {
const blink::WebCryptoAlgorithm algorithm; const blink::WebCryptoAlgorithm algorithm;
const blink::WebCryptoKey key; const blink::WebCryptoKey key;
blink::WebVector<unsigned char> signature; std::vector<unsigned char> signature;
blink::WebVector<unsigned char> data; std::vector<unsigned char> data;
bool verify_result; bool verify_result;
}; };
@ -298,7 +298,7 @@ struct WrapKeyState : public BaseState {
struct UnwrapKeyState : public BaseState { struct UnwrapKeyState : public BaseState {
UnwrapKeyState(blink::WebCryptoKeyFormat format, UnwrapKeyState(blink::WebCryptoKeyFormat format,
blink::WebVector<unsigned char> wrapped_key, std::vector<unsigned char> wrapped_key,
const blink::WebCryptoKey& wrapping_key, const blink::WebCryptoKey& wrapping_key,
const blink::WebCryptoAlgorithm& unwrap_algorithm, const blink::WebCryptoAlgorithm& unwrap_algorithm,
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm, const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
@ -316,7 +316,7 @@ struct UnwrapKeyState : public BaseState {
usages(usages) {} usages(usages) {}
const blink::WebCryptoKeyFormat format; const blink::WebCryptoKeyFormat format;
blink::WebVector<unsigned char> wrapped_key; std::vector<unsigned char> wrapped_key;
const blink::WebCryptoKey wrapping_key; const blink::WebCryptoKey wrapping_key;
const blink::WebCryptoAlgorithm unwrap_algorithm; const blink::WebCryptoAlgorithm unwrap_algorithm;
const blink::WebCryptoAlgorithm unwrapped_key_algorithm; const blink::WebCryptoAlgorithm unwrapped_key_algorithm;
@ -632,7 +632,7 @@ WebCryptoImpl::~WebCryptoImpl() {
void WebCryptoImpl::Encrypt( void WebCryptoImpl::Encrypt(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
DCHECK(!algorithm.IsNull()); DCHECK(!algorithm.IsNull());
@ -650,7 +650,7 @@ void WebCryptoImpl::Encrypt(
void WebCryptoImpl::Decrypt( void WebCryptoImpl::Decrypt(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
DCHECK(!algorithm.IsNull()); DCHECK(!algorithm.IsNull());
@ -667,7 +667,7 @@ void WebCryptoImpl::Decrypt(
void WebCryptoImpl::Digest( void WebCryptoImpl::Digest(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
DCHECK(!algorithm.IsNull()); DCHECK(!algorithm.IsNull());
@ -703,7 +703,7 @@ void WebCryptoImpl::GenerateKey(
void WebCryptoImpl::ImportKey( void WebCryptoImpl::ImportKey(
blink::WebCryptoKeyFormat format, blink::WebCryptoKeyFormat format,
blink::WebVector<unsigned char> key_data, std::vector<unsigned char> key_data,
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
bool extractable, bool extractable,
blink::WebCryptoKeyUsageMask usages, blink::WebCryptoKeyUsageMask usages,
@ -738,7 +738,7 @@ void WebCryptoImpl::ExportKey(
void WebCryptoImpl::Sign( void WebCryptoImpl::Sign(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
if (result.Cancelled()) if (result.Cancelled())
@ -754,8 +754,8 @@ void WebCryptoImpl::Sign(
void WebCryptoImpl::VerifySignature( void WebCryptoImpl::VerifySignature(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> signature, std::vector<unsigned char> signature,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
if (result.Cancelled()) if (result.Cancelled())
@ -789,7 +789,7 @@ void WebCryptoImpl::WrapKey(
void WebCryptoImpl::UnwrapKey( void WebCryptoImpl::UnwrapKey(
blink::WebCryptoKeyFormat format, blink::WebCryptoKeyFormat format,
blink::WebVector<unsigned char> wrapped_key, std::vector<unsigned char> wrapped_key,
const blink::WebCryptoKey& wrapping_key, const blink::WebCryptoKey& wrapping_key,
const blink::WebCryptoAlgorithm& unwrap_algorithm, const blink::WebCryptoAlgorithm& unwrap_algorithm,
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm, const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
@ -856,9 +856,8 @@ bool WebCryptoImpl::DeserializeKeyForClone(
key_data, &key); key_data, &key);
} }
bool WebCryptoImpl::SerializeKeyForClone( bool WebCryptoImpl::SerializeKeyForClone(const blink::WebCryptoKey& key,
const blink::WebCryptoKey& key, std::vector<unsigned char>& key_data) {
blink::WebVector<unsigned char>& key_data) {
return webcrypto::SerializeKeyForClone(key, &key_data); return webcrypto::SerializeKeyForClone(key, &key_data);
} }

@ -5,11 +5,12 @@
#ifndef COMPONENTS_WEBCRYPTO_WEBCRYPTO_IMPL_H_ #ifndef COMPONENTS_WEBCRYPTO_WEBCRYPTO_IMPL_H_
#define COMPONENTS_WEBCRYPTO_WEBCRYPTO_IMPL_H_ #define COMPONENTS_WEBCRYPTO_WEBCRYPTO_IMPL_H_
#include <vector>
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/task/single_thread_task_runner.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.h"
#include "third_party/blink/public/platform/web_crypto_algorithm.h" #include "third_party/blink/public/platform/web_crypto_algorithm.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace webcrypto { namespace webcrypto {
@ -31,17 +32,17 @@ class WebCryptoImpl : public blink::WebCrypto {
void Encrypt( void Encrypt(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void Decrypt( void Decrypt(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void Digest(const blink::WebCryptoAlgorithm& algorithm, void Digest(const blink::WebCryptoAlgorithm& algorithm,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void GenerateKey( void GenerateKey(
@ -52,7 +53,7 @@ class WebCryptoImpl : public blink::WebCrypto {
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void ImportKey( void ImportKey(
blink::WebCryptoKeyFormat format, blink::WebCryptoKeyFormat format,
blink::WebVector<unsigned char> key_data, std::vector<unsigned char> key_data,
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
bool extractable, bool extractable,
blink::WebCryptoKeyUsageMask usages, blink::WebCryptoKeyUsageMask usages,
@ -65,14 +66,14 @@ class WebCryptoImpl : public blink::WebCrypto {
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void Sign(const blink::WebCryptoAlgorithm& algorithm, void Sign(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void VerifySignature( void VerifySignature(
const blink::WebCryptoAlgorithm& algorithm, const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key, const blink::WebCryptoKey& key,
blink::WebVector<unsigned char> signature, std::vector<unsigned char> signature,
blink::WebVector<unsigned char> data, std::vector<unsigned char> data,
blink::WebCryptoResult result, blink::WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void WrapKey( void WrapKey(
@ -84,7 +85,7 @@ class WebCryptoImpl : public blink::WebCrypto {
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void UnwrapKey( void UnwrapKey(
blink::WebCryptoKeyFormat format, blink::WebCryptoKeyFormat format,
blink::WebVector<unsigned char> wrapped_key, std::vector<unsigned char> wrapped_key,
const blink::WebCryptoKey& wrapping_key, const blink::WebCryptoKey& wrapping_key,
const blink::WebCryptoAlgorithm& unwrap_algorithm, const blink::WebCryptoAlgorithm& unwrap_algorithm,
const blink::WebCryptoAlgorithm& unwrapped_key_algorithm, const blink::WebCryptoAlgorithm& unwrapped_key_algorithm,
@ -118,7 +119,7 @@ class WebCryptoImpl : public blink::WebCrypto {
blink::WebCryptoKey& key) override; blink::WebCryptoKey& key) override;
bool SerializeKeyForClone(const blink::WebCryptoKey& key, bool SerializeKeyForClone(const blink::WebCryptoKey& key,
blink::WebVector<unsigned char>& key_data) override; std::vector<unsigned char>& key_data) override;
}; };
} // namespace webcrypto } // namespace webcrypto

@ -9,6 +9,7 @@
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector>
#include "base/logging.h" #include "base/logging.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
@ -16,7 +17,6 @@
#include "components/services/font/public/mojom/font_service.mojom.h" #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_font_render_style.h"
#include "third_party/blink/public/platform/web_string.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" #include "ui/gfx/font_fallback_linux.h"
namespace content { namespace content {

@ -64,14 +64,14 @@ WebSandboxSupportWin::DigitsAndSigns(LCID lcid, bool force_defaults) {
return init_data; return init_data;
} }
blink::WebVector<blink::WebString> WebSandboxSupportWin::LocaleStrings( std::vector<blink::WebString> WebSandboxSupportWin::LocaleStrings(
LCID lcid, LCID lcid,
bool force_defaults, bool force_defaults,
mojom::SandboxSupport::LcTypeStrings collection) { mojom::SandboxSupport::LcTypeStrings collection) {
std::vector<std::u16string> results; std::vector<std::u16string> results;
CHECK(sandbox_support_->LocaleStrings(lcid, force_defaults, collection, CHECK(sandbox_support_->LocaleStrings(lcid, force_defaults, collection,
&results)); &results));
blink::WebVector<blink::WebString> ret; std::vector<blink::WebString> ret;
ret.reserve(results.size()); ret.reserve(results.size());
for (const auto& str : results) { for (const auto& str : results) {
ret.push_back(blink::WebString(str)); ret.push_back(blink::WebString(str));
@ -79,28 +79,28 @@ blink::WebVector<blink::WebString> WebSandboxSupportWin::LocaleStrings(
return ret; return ret;
} }
blink::WebVector<blink::WebString> WebSandboxSupportWin::MonthLabels( std::vector<blink::WebString> WebSandboxSupportWin::MonthLabels(
LCID lcid, LCID lcid,
bool force_defaults) { bool force_defaults) {
return LocaleStrings(lcid, force_defaults, return LocaleStrings(lcid, force_defaults,
mojom::SandboxSupport::LcTypeStrings::kMonths); mojom::SandboxSupport::LcTypeStrings::kMonths);
} }
blink::WebVector<blink::WebString> WebSandboxSupportWin::WeekDayShortLabels( std::vector<blink::WebString> WebSandboxSupportWin::WeekDayShortLabels(
LCID lcid, LCID lcid,
bool force_defaults) { bool force_defaults) {
return LocaleStrings(lcid, force_defaults, return LocaleStrings(lcid, force_defaults,
mojom::SandboxSupport::LcTypeStrings::kShortWeekDays); mojom::SandboxSupport::LcTypeStrings::kShortWeekDays);
} }
blink::WebVector<blink::WebString> WebSandboxSupportWin::ShortMonthLabels( std::vector<blink::WebString> WebSandboxSupportWin::ShortMonthLabels(
LCID lcid, LCID lcid,
bool force_defaults) { bool force_defaults) {
return LocaleStrings(lcid, force_defaults, return LocaleStrings(lcid, force_defaults,
mojom::SandboxSupport::LcTypeStrings::kShortMonths); mojom::SandboxSupport::LcTypeStrings::kShortMonths);
} }
blink::WebVector<blink::WebString> WebSandboxSupportWin::AmPmLabels( std::vector<blink::WebString> WebSandboxSupportWin::AmPmLabels(
LCID lcid, LCID lcid,
bool force_defaults) { bool force_defaults) {
return LocaleStrings(lcid, force_defaults, return LocaleStrings(lcid, force_defaults,

@ -34,22 +34,21 @@ class WebSandboxSupportWin : public blink::WebSandboxSupport {
LCID lcid, LCID lcid,
bool force_defaults) override; 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; bool force_defaults) override;
blink::WebVector<blink::WebString> WeekDayShortLabels( std::vector<blink::WebString> AmPmLabels(LCID lcid,
LCID lcid, bool force_defaults) override;
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;
blink::WebString LocaleString(LCID lcid, blink::WebString LocaleString(LCID lcid,
LCTYPE type, LCTYPE type,
bool force_defaults) override; bool force_defaults) override;
private: private:
blink::WebVector<blink::WebString> LocaleStrings( std::vector<blink::WebString> LocaleStrings(
LCID lcid, LCID lcid,
bool force_defaults, bool force_defaults,
mojom::SandboxSupport::LcTypeStrings collection); mojom::SandboxSupport::LcTypeStrings collection);

@ -326,7 +326,7 @@ ContentRendererClient::GetAudioRendererAlgorithmParameters(
void ContentRendererClient::AppendContentSecurityPolicy( void ContentRendererClient::AppendContentSecurityPolicy(
const blink::WebURL& url, const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {} std::vector<blink::WebContentSecurityPolicyHeader>* csp) {}
std::unique_ptr<media::RendererFactory> std::unique_ptr<media::RendererFactory>
ContentRendererClient::GetBaseRendererFactory( ContentRendererClient::GetBaseRendererFactory(

@ -455,7 +455,7 @@ class CONTENT_EXPORT ContentRendererClient {
// `url`. This allows the embedder to customize the applied CSP. // `url`. This allows the embedder to customize the applied CSP.
virtual void AppendContentSecurityPolicy( virtual void AppendContentSecurityPolicy(
const blink::WebURL& url, const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp); std::vector<blink::WebContentSecurityPolicyHeader>* csp);
// Returns a RendererFactory to use as the "base" for a // Returns a RendererFactory to use as the "base" for a
// RendererFactorySelector. Returns `nullptr` to get the default behaviour. // RendererFactorySelector. Returns `nullptr` to get the default behaviour.

@ -9,6 +9,7 @@
#include <optional> #include <optional>
#include <string> #include <string>
#include <vector>
#include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr.h"
#include "base/memory/read_only_shared_memory_region.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/devtools/console_message.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom.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/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_meaningful_layout.h"
#include "third_party/blink/public/web/web_navigation_type.h" #include "third_party/blink/public/web/web_navigation_type.h"
#include "ui/accessibility/ax_mode.h" #include "ui/accessibility/ax_mode.h"
@ -155,8 +155,8 @@ class CONTENT_EXPORT RenderFrameObserver
virtual void DidChangeScrollOffset() {} virtual void DidChangeScrollOffset() {}
virtual void WillSubmitForm(const blink::WebFormElement& form) {} virtual void WillSubmitForm(const blink::WebFormElement& form) {}
virtual void DidMatchCSS( virtual void DidMatchCSS(
const blink::WebVector<blink::WebString>& newly_matching_selectors, const std::vector<blink::WebString>& newly_matching_selectors,
const blink::WebVector<blink::WebString>& stopped_matching_selectors) {} const std::vector<blink::WebString>& stopped_matching_selectors) {}
// Called when the RenderFrame creates a FencedFrame and provides the // Called when the RenderFrame creates a FencedFrame and provides the
// RemoteFrameToken to identify the `blink::RemoteFrame` to the inner // RemoteFrameToken to identify the `blink::RemoteFrame` to the inner

@ -51,7 +51,6 @@ using blink::WebDocument;
using blink::WebElement; using blink::WebElement;
using blink::WebNode; using blink::WebNode;
using blink::WebString; using blink::WebString;
using blink::WebVector;
namespace content { namespace content {
@ -306,7 +305,7 @@ void AXImageAnnotator::AddImageAnnotationsForNode(WebAXObject& src,
// Reject images that are explicitly empty, or that have a // Reject images that are explicitly empty, or that have a
// meaningful name already. // meaningful name already.
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
WebVector<WebAXObject> name_objects; std::vector<WebAXObject> name_objects;
WebString web_name = src.GetName(name_from, name_objects); WebString web_name = src.GetName(name_from, name_objects);
// If an image has a nonempty name, compute whether we should add an // 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 // as a function of whether the retrieved image label was
// a success, an error, or empty. // a success, an error, or empty.
ax::mojom::NameFrom name_from; 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); blink::WebString web_name = image.GetName(name_from, name_objects);
int non_stop_length = GetLengthAfterRemovingStopwords(web_name.Utf8()); int non_stop_length = GetLengthAfterRemovingStopwords(web_name.Utf8());

@ -5,10 +5,11 @@
#ifndef CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ #ifndef CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_
#define CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ #define CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_
#include <vector>
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "services/network/public/mojom/content_security_policy.mojom-forward.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_content_security_policy_struct.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace content { namespace content {

@ -5,6 +5,8 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <vector>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/containers/contains.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_data.h"
#include "third_party/blink/public/platform/web_string.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_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/test/test_web_frame_content_dumper.h"
#include "third_party/blink/public/web/web_document.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.h"
@ -57,7 +58,6 @@ using blink::WebMetaElement;
using blink::WebNode; using blink::WebNode;
using blink::WebString; using blink::WebString;
using blink::WebURL; using blink::WebURL;
using blink::WebVector;
using blink::WebView; using blink::WebView;
namespace content { namespace content {
@ -91,7 +91,7 @@ class MAYBE_DomSerializerTests : public ContentBrowserTest,
} }
// DomSerializerDelegate. // DomSerializerDelegate.
void DidSerializeDataForFrame(const WebVector<char>& data, void DidSerializeDataForFrame(const std::vector<char>& data,
FrameSerializationStatus status) override { FrameSerializationStatus status) override {
// Check finish status of current frame. // Check finish status of current frame.
ASSERT_FALSE(serialization_reported_end_of_data_); ASSERT_FALSE(serialization_reported_end_of_data_);

@ -31,7 +31,7 @@ std::optional<blink::InspectorPlayerError> ErrorFromParams(
caused_by.push_back(*parsed_cause); 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)) { if (const auto* vec = param.FindList(media::StatusConstants::kStackKey)) {
for (const auto& loc : *vec) { for (const auto& loc : *vec) {
const auto& loc_dict = loc.GetDict(); 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)) { if (auto* data = param.FindDict(media::StatusConstants::kDataKey)) {
for (const auto pair : *data) { for (const auto pair : *data) {
std::string json; std::string json;

@ -6,6 +6,8 @@
#include <stddef.h> #include <stddef.h>
#include <vector>
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/functional/bind.h" #include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.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/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/file_path_conversion.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_string.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace content { namespace content {

@ -46,7 +46,6 @@ using blink::WebPluginParams;
using blink::WebPrintParams; using blink::WebPrintParams;
using blink::WebString; using blink::WebString;
using blink::WebURL; using blink::WebURL;
using blink::WebVector;
namespace content { namespace content {

@ -567,9 +567,8 @@ class CONTENT_EXPORT RenderFrameImpl
void FrameDetached(blink::DetachReason detach_reason) override; void FrameDetached(blink::DetachReason detach_reason) override;
void DidChangeName(const blink::WebString& name) override; void DidChangeName(const blink::WebString& name) override;
void DidMatchCSS( void DidMatchCSS(
const blink::WebVector<blink::WebString>& newly_matching_selectors, const std::vector<blink::WebString>& newly_matching_selectors,
const blink::WebVector<blink::WebString>& stopped_matching_selectors) const std::vector<blink::WebString>& stopped_matching_selectors) override;
override;
bool ShouldReportDetailedMessageForSourceAndSeverity( bool ShouldReportDetailedMessageForSourceAndSeverity(
blink::mojom::ConsoleMessageLevel log_level, blink::mojom::ConsoleMessageLevel log_level,
const blink::WebString& source) override; const blink::WebString& source) override;

@ -915,7 +915,7 @@ void RenderThreadImpl::InitializeRenderer(
user_agent_metadata_ = user_agent_metadata; user_agent_metadata_ = user_agent_metadata;
cors_exempt_header_list_ = cors_exempt_header_list; 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()); cors_exempt_header_list.size());
std::ranges::transform( std::ranges::transform(
cors_exempt_header_list, web_cors_exempt_header_list.begin(), cors_exempt_header_list, web_cors_exempt_header_list.begin(),

@ -200,7 +200,7 @@ TEST_F(RenderWidgetTest, GetCompositionRangeValidComposition) {
"<script> document.querySelector('div').focus(); </script>"); "<script> document.querySelector('div').focus(); </script>");
gfx::Range range = LastCompositionRange(); gfx::Range range = LastCompositionRange();
EXPECT_FALSE(range.IsValid()); EXPECT_FALSE(range.IsValid());
blink::WebVector<ui::ImeTextSpan> empty_ime_text_spans; std::vector<ui::ImeTextSpan> empty_ime_text_spans;
DCHECK(GetInputMethodController()); DCHECK(GetInputMethodController());
GetInputMethodController()->SetComposition("hello", empty_ime_text_spans, GetInputMethodController()->SetComposition("hello", empty_ime_text_spans,
blink::WebRange(), 3, 3); 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.h"
#include "third_party/blink/public/platform/web_url_request.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_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/modules/media/audio/audio_device_factory.h"
#include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_media_inspector.h" #include "third_party/blink/public/web/web_media_inspector.h"
@ -150,7 +149,6 @@ using blink::WebAudioSinkDescriptor;
using blink::WebMediaStreamTrack; using blink::WebMediaStreamTrack;
using blink::WebString; using blink::WebString;
using blink::WebURL; using blink::WebURL;
using blink::WebVector;
namespace content { namespace content {
@ -1060,7 +1058,7 @@ bool RendererBlinkPlatformImpl::DisallowV8FeatureFlagOverrides() const {
void RendererBlinkPlatformImpl::AppendContentSecurityPolicy( void RendererBlinkPlatformImpl::AppendContentSecurityPolicy(
const blink::WebURL& url, const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) { std::vector<blink::WebContentSecurityPolicyHeader>* csp) {
GetContentClient()->renderer()->AppendContentSecurityPolicy(url, csp); GetContentClient()->renderer()->AppendContentSecurityPolicy(url, csp);
} }

@ -235,7 +235,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
bool DisallowV8FeatureFlagOverrides() const override; bool DisallowV8FeatureFlagOverrides() const override;
void AppendContentSecurityPolicy( void AppendContentSecurityPolicy(
const blink::WebURL& url, const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override; std::vector<blink::WebContentSecurityPolicyHeader>* csp) override;
bool IsFilePickerAllowedForCrossOriginSubframe( bool IsFilePickerAllowedForCrossOriginSubframe(
const blink::WebSecurityOrigin& origin) override; const blink::WebSecurityOrigin& origin) override;
base::PlatformThreadId GetIOThreadId() const override; base::PlatformThreadId GetIOThreadId() const override;

@ -181,10 +181,10 @@ class ShellContentRendererUrlLoaderThrottleProvider
base::PassKey<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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override { 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()) { if (local_frame_token.has_value()) {
auto throttle = auto throttle =
content::MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating( content::MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating(

@ -15,6 +15,7 @@
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector>
#include "base/check_op.h" #include "base/check_op.h"
#include "base/command_line.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/scheduler/web_thread_scheduler.h"
#include "third_party/blink/public/platform/url_conversion.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_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/blink.h"
#include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame.h"
@ -85,7 +85,6 @@ using blink::WebString;
using blink::WebTouchEvent; using blink::WebTouchEvent;
using blink::WebTouchPoint; using blink::WebTouchPoint;
using blink::WebURL; using blink::WebURL;
using blink::WebVector;
using blink::WebView; using blink::WebView;
namespace content { 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; (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, const std::string& prefix,
std::vector<std::string>* strings) { std::vector<std::string>* strings) {
for (size_t i = 0; i < customItems.size(); ++i) { 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) { for (const char** item = kEditableMenuStrings; *item; ++item) {
strings.push_back(*item); strings.push_back(*item);
} }
WebVector<WebString> suggestions; std::vector<WebString> suggestions;
WebTestSpellChecker::FillSuggestionList( WebTestSpellChecker::FillSuggestionList(
WebString::FromUTF16(context_menu->misspelled_word), &suggestions); WebString::FromUTF16(context_menu->misspelled_word), &suggestions);
for (const WebString& suggestion : suggestions) for (const WebString& suggestion : suggestions)
@ -1875,7 +1874,7 @@ void EventSender::DumpFilenameBeingDragged(blink::WebLocalFrame* frame) {
auto* frame_proxy = auto* frame_proxy =
static_cast<WebFrameTestProxy*>(RenderFrame::FromWebFrame(frame)); 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) { for (const auto& item : items) {
if (const auto* binary_data_item = if (const auto* binary_data_item =
absl::get_if<WebDragData::BinaryDataItem>(&item)) { absl::get_if<WebDragData::BinaryDataItem>(&item)) {
@ -1940,7 +1939,7 @@ void EventSender::LeapForward(int milliseconds) {
void EventSender::BeginDragWithItems( void EventSender::BeginDragWithItems(
blink::WebLocalFrame* frame, blink::WebLocalFrame* frame,
const WebVector<WebDragData::Item>& items) { const std::vector<WebDragData::Item>& items) {
if (current_drag_data_) { if (current_drag_data_) {
// Nested dragging not supported, fuzzer code a likely culprit. // Nested dragging not supported, fuzzer code a likely culprit.
// Cancel the current drag operation and throw an error. // Cancel the current drag operation and throw an error.
@ -1991,7 +1990,7 @@ void EventSender::BeginDragWithItems(
void EventSender::BeginDragWithFiles(blink::WebLocalFrame* frame, void EventSender::BeginDragWithFiles(blink::WebLocalFrame* frame,
const std::vector<std::string>& files) { const std::vector<std::string>& files) {
WebVector<WebDragData::Item> items; std::vector<WebDragData::Item> items;
for (const std::string& file_path : files) { for (const std::string& file_path : files) {
WebDragData::FilenameItem item = { WebDragData::FilenameItem item = {
@ -2006,7 +2005,7 @@ void EventSender::BeginDragWithFiles(blink::WebLocalFrame* frame,
void EventSender::BeginDragWithStringData(blink::WebLocalFrame* frame, void EventSender::BeginDragWithStringData(blink::WebLocalFrame* frame,
const std::string& data, const std::string& data,
const std::string& mime_type) { const std::string& mime_type) {
WebVector<WebDragData::Item> items; std::vector<WebDragData::Item> items;
WebDragData::StringItem item = { WebDragData::StringItem item = {
.type = WebString::FromUTF8(mime_type), .type = WebString::FromUTF8(mime_type),
.data = WebString::FromUTF8(data), .data = WebString::FromUTF8(data),

@ -147,9 +147,8 @@ class EventSender {
void LeapForward(int milliseconds); void LeapForward(int milliseconds);
void BeginDragWithItems( void BeginDragWithItems(blink::WebLocalFrame* frame,
blink::WebLocalFrame* frame, const std::vector<blink::WebDragData::Item>& items);
const blink::WebVector<blink::WebDragData::Item>& items);
void BeginDragWithFiles(blink::WebLocalFrame* frame, void BeginDragWithFiles(blink::WebLocalFrame* frame,
const std::vector<std::string>& files); const std::vector<std::string>& files);
void BeginDragWithStringData(blink::WebLocalFrame* frame, void BeginDragWithStringData(blink::WebLocalFrame* frame,

@ -44,7 +44,7 @@ void SpellCheckClient::CheckSpelling(
const blink::WebString& text, const blink::WebString& text,
size_t& misspelled_offset, size_t& misspelled_offset,
size_t& misspelled_length, size_t& misspelled_length,
blink::WebVector<blink::WebString>* optional_suggestions) { std::vector<blink::WebString>* optional_suggestions) {
if (!enabled_) { if (!enabled_) {
misspelled_offset = 0; misspelled_offset = 0;
misspelled_length = 0; misspelled_length = 0;
@ -99,7 +99,7 @@ void SpellCheckClient::FinishLastTextCheck() {
&misspelled_position, &misspelled_length); &misspelled_position, &misspelled_length);
if (!misspelled_length) if (!misspelled_length)
break; break;
blink::WebVector<blink::WebString> suggestions; std::vector<blink::WebString> suggestions;
spell_checker_.FillSuggestionList( spell_checker_.FillSuggestionList(
blink::WebString::FromUTF16( blink::WebString::FromUTF16(
text.substr(misspelled_position, misspelled_length)), text.substr(misspelled_position, misspelled_length)),

@ -7,11 +7,12 @@
#include <stdint.h> #include <stdint.h>
#include <vector>
#include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "content/web_test/renderer/web_test_spell_checker.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_string.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/web_text_check_client.h" #include "third_party/blink/public/web/web_text_check_client.h"
#include "v8/include/v8.h" #include "v8/include/v8.h"
@ -47,7 +48,7 @@ class SpellCheckClient : public blink::WebTextCheckClient {
const blink::WebString& text, const blink::WebString& text,
size_t& offset, size_t& offset,
size_t& length, size_t& length,
blink::WebVector<blink::WebString>* optional_suggestions) override; std::vector<blink::WebString>* optional_suggestions) override;
void RequestCheckingOfText( void RequestCheckingOfText(
const blink::WebString& text, const blink::WebString& text,
std::unique_ptr<blink::WebTextCheckingCompletion> completion) override; 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()); uint32_t page_count = frame->PrintBegin(print_params, blink::WebNode());
const printing::PageRanges& page_ranges = GetPrintingPageRanges(frame); const printing::PageRanges& page_ranges = GetPrintingPageRanges(frame);
blink::WebVector<uint32_t> pages( std::vector<uint32_t> pages(
printing::PageNumber::GetPages(page_ranges, page_count)); printing::PageNumber::GetPages(page_ranges, page_count));
gfx::Size spool_size = frame->SpoolSizeInPixelsForTesting(pages); gfx::Size spool_size = frame->SpoolSizeInPixelsForTesting(pages);

@ -416,7 +416,7 @@ void TextInputController::SetComposition(const std::string& text,
replacement_range_end - replacement_range_start); replacement_range_end - replacement_range_start);
if (auto* controller = GetInputMethodController()) { if (auto* controller = GetInputMethodController()) {
controller->SetComposition( 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); 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); gfx::RectF inline_text_box_rect = BoundsForObject(inline_text_box);
int local_index = character_index - start; int local_index = character_index - start;
blink::WebVector<int> character_offsets; std::vector<int> character_offsets;
inline_text_box.CharacterOffsets(character_offsets); inline_text_box.CharacterOffsets(character_offsets);
if (character_offsets.size() != name.length()) if (character_offsets.size() != name.length())
return gfx::Rect(); return gfx::Rect();
@ -196,8 +196,8 @@ void GetBoundariesForOneWord(const blink::WebAXObject& object,
continue; continue;
int local_index = character_index - start; int local_index = character_index - start;
blink::WebVector<int> starts; std::vector<int> starts;
blink::WebVector<int> ends; std::vector<int> ends;
inline_text_box.GetWordBoundaries(starts, ends); inline_text_box.GetWordBoundaries(starts, ends);
size_t word_count = starts.size(); size_t word_count = starts.size();
DCHECK_EQ(ends.size(), word_count); DCHECK_EQ(ends.size(), word_count);
@ -1242,7 +1242,7 @@ int32_t WebAXObjectProxy::RowHeadersCount() {
if (!UpdateLayout()) { if (!UpdateLayout()) {
return 0; return 0;
} }
blink::WebVector<blink::WebAXObject> headers; std::vector<blink::WebAXObject> headers;
accessibility_object_.RowHeaders(headers); accessibility_object_.RowHeaders(headers);
return static_cast<int32_t>(headers.size()); return static_cast<int32_t>(headers.size());
} }
@ -1258,7 +1258,7 @@ int32_t WebAXObjectProxy::ColumnHeadersCount() {
if (!UpdateLayout()) { if (!UpdateLayout()) {
return 0; return 0;
} }
blink::WebVector<blink::WebAXObject> headers; std::vector<blink::WebAXObject> headers;
accessibility_object_.ColumnHeaders(headers); accessibility_object_.ColumnHeaders(headers);
return static_cast<int32_t>(headers.size()); return static_cast<int32_t>(headers.size());
} }
@ -1362,7 +1362,7 @@ v8::Local<v8::Object> WebAXObjectProxy::AriaOwnsElementAtIndex(unsigned index) {
if (!UpdateLayout()) { if (!UpdateLayout()) {
return v8::Local<v8::Object>(); return v8::Local<v8::Object>();
} }
blink::WebVector<blink::WebAXObject> elements; std::vector<blink::WebAXObject> elements;
accessibility_object_.AriaOwns(elements); accessibility_object_.AriaOwns(elements);
size_t element_count = elements.size(); size_t element_count = elements.size();
if (index >= element_count) if (index >= element_count)
@ -1446,7 +1446,7 @@ v8::Local<v8::Object> WebAXObjectProxy::RowHeaderAtIndex(unsigned index) {
if (!UpdateLayout()) { if (!UpdateLayout()) {
return v8::Local<v8::Object>(); return v8::Local<v8::Object>();
} }
blink::WebVector<blink::WebAXObject> headers; std::vector<blink::WebAXObject> headers;
accessibility_object_.RowHeaders(headers); accessibility_object_.RowHeaders(headers);
size_t header_count = headers.size(); size_t header_count = headers.size();
if (index >= header_count) if (index >= header_count)
@ -1459,7 +1459,7 @@ v8::Local<v8::Object> WebAXObjectProxy::ColumnHeaderAtIndex(unsigned index) {
if (!UpdateLayout()) { if (!UpdateLayout()) {
return v8::Local<v8::Object>(); return v8::Local<v8::Object>();
} }
blink::WebVector<blink::WebAXObject> headers; std::vector<blink::WebAXObject> headers;
accessibility_object_.ColumnHeaders(headers); accessibility_object_.ColumnHeaders(headers);
size_t header_count = headers.size(); size_t header_count = headers.size();
if (index >= header_count) if (index >= header_count)
@ -1849,7 +1849,7 @@ std::string WebAXObjectProxy::NameFrom() {
return ""; return "";
} }
ax::mojom::NameFrom name_from = ax::mojom::NameFrom::kNone; 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); accessibility_object_.GetName(name_from, name_objects);
switch (name_from) { switch (name_from) {
case ax::mojom::NameFrom::kNone: case ax::mojom::NameFrom::kNone:
@ -1864,7 +1864,7 @@ int WebAXObjectProxy::NameElementCount() {
return 0; return 0;
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
return static_cast<int>(name_objects.size()); return static_cast<int>(name_objects.size());
} }
@ -1874,7 +1874,7 @@ v8::Local<v8::Object> WebAXObjectProxy::NameElementAtIndex(unsigned index) {
return {}; return {};
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
if (index >= name_objects.size()) if (index >= name_objects.size())
return {}; return {};
@ -1886,10 +1886,10 @@ std::string WebAXObjectProxy::Description() {
return ""; return "";
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
ax::mojom::DescriptionFrom description_from; ax::mojom::DescriptionFrom description_from;
blink::WebVector<blink::WebAXObject> description_objects; std::vector<blink::WebAXObject> description_objects;
return accessibility_object_ return accessibility_object_
.Description(name_from, description_from, description_objects) .Description(name_from, description_from, description_objects)
.Utf8(); .Utf8();
@ -1900,11 +1900,11 @@ std::string WebAXObjectProxy::DescriptionFrom() {
return ""; return "";
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
ax::mojom::DescriptionFrom description_from = ax::mojom::DescriptionFrom description_from =
ax::mojom::DescriptionFrom::kNone; ax::mojom::DescriptionFrom::kNone;
blink::WebVector<blink::WebAXObject> description_objects; std::vector<blink::WebAXObject> description_objects;
accessibility_object_.Description(name_from, description_from, accessibility_object_.Description(name_from, description_from,
description_objects); description_objects);
switch (description_from) { switch (description_from) {
@ -1920,7 +1920,7 @@ std::string WebAXObjectProxy::Placeholder() {
return ""; return "";
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
return accessibility_object_.Placeholder(name_from).Utf8(); return accessibility_object_.Placeholder(name_from).Utf8();
} }
@ -1937,10 +1937,10 @@ int WebAXObjectProxy::DescriptionElementCount() {
return 0; return 0;
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
ax::mojom::DescriptionFrom description_from; ax::mojom::DescriptionFrom description_from;
blink::WebVector<blink::WebAXObject> description_objects; std::vector<blink::WebAXObject> description_objects;
accessibility_object_.Description(name_from, description_from, accessibility_object_.Description(name_from, description_from,
description_objects); description_objects);
return static_cast<int>(description_objects.size()); return static_cast<int>(description_objects.size());
@ -1952,10 +1952,10 @@ v8::Local<v8::Object> WebAXObjectProxy::DescriptionElementAtIndex(
return v8::Local<v8::Object>(); return v8::Local<v8::Object>();
} }
ax::mojom::NameFrom name_from; ax::mojom::NameFrom name_from;
blink::WebVector<blink::WebAXObject> name_objects; std::vector<blink::WebAXObject> name_objects;
accessibility_object_.GetName(name_from, name_objects); accessibility_object_.GetName(name_from, name_objects);
ax::mojom::DescriptionFrom description_from; ax::mojom::DescriptionFrom description_from;
blink::WebVector<blink::WebAXObject> description_objects; std::vector<blink::WebAXObject> description_objects;
accessibility_object_.Description(name_from, description_from, accessibility_object_.Description(name_from, description_from,
description_objects); description_objects);
if (index >= description_objects.size()) if (index >= description_objects.size())

@ -21,9 +21,8 @@ namespace content {
namespace { namespace {
void Append(blink::WebVector<blink::WebString>* data, void Append(std::vector<blink::WebString>* data, const blink::WebString& item) {
const blink::WebString& item) { std::vector<blink::WebString> result(data->size() + 1);
blink::WebVector<blink::WebString> result(data->size() + 1);
for (size_t i = 0; i < data->size(); ++i) for (size_t i = 0; i < data->size(); ++i)
result[i] = (*data)[i]; result[i] = (*data)[i];
result[data->size()] = item; result[data->size()] = item;
@ -135,7 +134,7 @@ bool WebTestSpellChecker::IsMultiWordMisspelling(
void WebTestSpellChecker::FillSuggestionList( void WebTestSpellChecker::FillSuggestionList(
const blink::WebString& word, const blink::WebString& word,
blink::WebVector<blink::WebString>* suggestions) { std::vector<blink::WebString>* suggestions) {
if (word == "wellcome") if (word == "wellcome")
Append(suggestions, blink::WebString::FromUTF8("welcome")); Append(suggestions, blink::WebString::FromUTF8("welcome"));
else if (word == "upper case") else if (word == "upper case")

@ -8,7 +8,6 @@
#include <vector> #include <vector>
#include "third_party/blink/public/platform/web_string.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" #include "third_party/blink/public/web/web_text_checking_result.h"
namespace content { namespace content {
@ -20,9 +19,8 @@ namespace content {
// suitable for any other usages. // suitable for any other usages.
class WebTestSpellChecker { class WebTestSpellChecker {
public: public:
static void FillSuggestionList( static void FillSuggestionList(const blink::WebString& word,
const blink::WebString& word, std::vector<blink::WebString>* suggestions);
blink::WebVector<blink::WebString>* suggestions);
WebTestSpellChecker(); WebTestSpellChecker();
~WebTestSpellChecker(); ~WebTestSpellChecker();

@ -29,7 +29,7 @@ class FrameContentWatcher
public content::RenderFrameObserverTracker<FrameContentWatcher> { public content::RenderFrameObserverTracker<FrameContentWatcher> {
public: public:
FrameContentWatcher(content::RenderFrame* render_frame, FrameContentWatcher(content::RenderFrame* render_frame,
const blink::WebVector<blink::WebString>& css_selectors); const std::vector<blink::WebString>& css_selectors);
FrameContentWatcher(const FrameContentWatcher&) = delete; FrameContentWatcher(const FrameContentWatcher&) = delete;
FrameContentWatcher& operator=(const FrameContentWatcher&) = delete; FrameContentWatcher& operator=(const FrameContentWatcher&) = delete;
@ -40,11 +40,10 @@ class FrameContentWatcher
void OnDestruct() override; void OnDestruct() override;
void DidCreateDocumentElement() override; void DidCreateDocumentElement() override;
void DidMatchCSS( void DidMatchCSS(
const blink::WebVector<blink::WebString>& newly_matching_selectors, const std::vector<blink::WebString>& newly_matching_selectors,
const blink::WebVector<blink::WebString>& stopped_matching_selectors) const std::vector<blink::WebString>& stopped_matching_selectors) override;
override;
void UpdateCSSSelectors(const blink::WebVector<blink::WebString>& selectors); void UpdateCSSSelectors(const std::vector<blink::WebString>& selectors);
private: private:
// Given that we saw a change in the CSS selectors that the associated frame // 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. // frames the top frame cannot access, we may have to rethink this.
void NotifyBrowserOfChange(); void NotifyBrowserOfChange();
blink::WebVector<blink::WebString> css_selectors_; std::vector<blink::WebString> css_selectors_;
std::set<std::string> matching_selectors_; std::set<std::string> matching_selectors_;
bool document_created_ = false; bool document_created_ = false;
}; };
FrameContentWatcher::FrameContentWatcher( FrameContentWatcher::FrameContentWatcher(
content::RenderFrame* render_frame, content::RenderFrame* render_frame,
const blink::WebVector<blink::WebString>& css_selectors) const std::vector<blink::WebString>& css_selectors)
: content::RenderFrameObserver(render_frame), : content::RenderFrameObserver(render_frame),
content::RenderFrameObserverTracker<FrameContentWatcher>(render_frame), content::RenderFrameObserverTracker<FrameContentWatcher>(render_frame),
css_selectors_(css_selectors) {} css_selectors_(css_selectors) {}
@ -84,8 +83,8 @@ void FrameContentWatcher::DidCreateDocumentElement() {
} }
void FrameContentWatcher::DidMatchCSS( void FrameContentWatcher::DidMatchCSS(
const blink::WebVector<blink::WebString>& newly_matching_selectors, const std::vector<blink::WebString>& newly_matching_selectors,
const blink::WebVector<blink::WebString>& stopped_matching_selectors) { const std::vector<blink::WebString>& stopped_matching_selectors) {
for (size_t i = 0; i < stopped_matching_selectors.size(); ++i) for (size_t i = 0; i < stopped_matching_selectors.size(); ++i)
matching_selectors_.erase(stopped_matching_selectors[i].Utf8()); matching_selectors_.erase(stopped_matching_selectors[i].Utf8());
for (size_t i = 0; i < newly_matching_selectors.size(); ++i) for (size_t i = 0; i < newly_matching_selectors.size(); ++i)
@ -95,7 +94,7 @@ void FrameContentWatcher::DidMatchCSS(
} }
void FrameContentWatcher::UpdateCSSSelectors( void FrameContentWatcher::UpdateCSSSelectors(
const blink::WebVector<blink::WebString>& selectors) { const std::vector<blink::WebString>& selectors) {
css_selectors_ = selectors; css_selectors_ = selectors;
if (document_created_) { if (document_created_) {
render_frame()->GetWebFrame()->GetDocument().WatchCSSSelectors( render_frame()->GetWebFrame()->GetDocument().WatchCSSSelectors(
@ -146,7 +145,7 @@ ContentWatcher::~ContentWatcher() = default;
void ContentWatcher::OnWatchPages( void ContentWatcher::OnWatchPages(
const std::vector<std::string>& new_css_selectors_utf8) { 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()); new_css_selectors_utf8.size());
bool changed = new_css_selectors.size() != css_selectors_.size(); bool changed = new_css_selectors.size() != css_selectors_.size();
for (size_t i = 0; i < new_css_selectors.size(); ++i) { 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 // 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. // style, which will in turn notify the browser about the changes.
struct WatchSelectors : public content::RenderFrameVisitor { struct WatchSelectors : public content::RenderFrameVisitor {
explicit WatchSelectors( explicit WatchSelectors(const std::vector<blink::WebString>& css_selectors)
const blink::WebVector<blink::WebString>& css_selectors)
: css_selectors(css_selectors) {} : css_selectors(css_selectors) {}
bool Visit(content::RenderFrame* frame) override { bool Visit(content::RenderFrame* frame) override {
@ -174,7 +172,7 @@ void ContentWatcher::OnWatchPages(
return true; // Continue visiting. 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_); WatchSelectors visitor(css_selectors_);
content::RenderFrame::ForEach(&visitor); content::RenderFrame::ForEach(&visitor);

@ -8,8 +8,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
class WebString; class WebString;
} }
@ -43,7 +41,7 @@ class ContentWatcher {
private: private:
// If any of these selectors match on a page, we need to call // If any of these selectors match on a page, we need to call
// extensions::mojom::LocalFrameHost::WatchedPageChange to notify the browser. // extensions::mojom::LocalFrameHost::WatchedPageChange to notify the browser.
blink::WebVector<blink::WebString> css_selectors_; std::vector<blink::WebString> css_selectors_;
}; };
} // namespace extensions } // namespace extensions

@ -37,7 +37,7 @@ WebEngineURLLoaderThrottleProvider::Clone() {
return cloned_provider; return cloned_provider;
} }
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
WebEngineURLLoaderThrottleProvider::CreateThrottles( WebEngineURLLoaderThrottleProvider::CreateThrottles(
base::optional_ref<const blink::LocalFrameToken> local_frame_token, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) { const network::ResourceRequest& request) {
@ -49,7 +49,7 @@ WebEngineURLLoaderThrottleProvider::CreateThrottles(
return {}; return {};
} }
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles; std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
auto rules = content_renderer_client_->GetRewriteRulesForFrameToken( auto rules = content_renderer_client_->GetRewriteRulesForFrameToken(
local_frame_token.value()); local_frame_token.value());
if (rules) { if (rules) {

@ -29,7 +29,7 @@ class WebEngineURLLoaderThrottleProvider
// blink::URLLoaderThrottleProvider implementation. // blink::URLLoaderThrottleProvider implementation.
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override; 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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override; const network::ResourceRequest& request) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;

@ -45,10 +45,10 @@ class HeadlessContentRendererUrlLoaderThrottleProvider
base::PassKey<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, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) override { 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()) { if (local_frame_token.has_value()) {
auto throttle = auto throttle =
content::MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating( content::MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating(

@ -5,11 +5,11 @@
#include "pdf/parsed_params.h" #include "pdf/parsed_params.h"
#include <string> #include <string>
#include <vector>
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "pdf/pdfium/pdfium_form_filler.h" #include "pdf/pdfium/pdfium_form_filler.h"
#include "third_party/blink/public/platform/web_string.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/blink/public/web/web_plugin_params.h"
namespace chrome_pdf { namespace chrome_pdf {

@ -6,12 +6,12 @@
#include <optional> #include <optional>
#include <string> #include <string>
#include <vector>
#include "pdf/pdfium/pdfium_form_filler.h" #include "pdf/pdfium/pdfium_form_filler.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_string.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/blink/public/web/web_plugin_params.h"
#include "third_party/skia/include/core/SkColor.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_common.h"
#include "third_party/blink/public/platform/web_content_settings_client.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_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" #include "third_party/blink/public/web/web_local_frame.h"
namespace media { namespace media {
@ -79,10 +78,10 @@ class BLINK_PLATFORM_EXPORT KeySystemConfigSelector {
using SelectConfigCB = base::OnceCallback< using SelectConfigCB = base::OnceCallback<
void(Status status, WebMediaKeySystemConfiguration*, media::CdmConfig*)>; void(Status status, WebMediaKeySystemConfiguration*, media::CdmConfig*)>;
void SelectConfig( void SelectConfig(const WebString& key_system,
const WebString& key_system, const std::vector<WebMediaKeySystemConfiguration>&
const WebVector<WebMediaKeySystemConfiguration>& candidate_configurations, candidate_configurations,
SelectConfigCB cb); SelectConfigCB cb);
using IsSupportedMediaTypeCB = using IsSupportedMediaTypeCB =
base::RepeatingCallback<bool(const std::string& container_mime_type, base::RepeatingCallback<bool(const std::string& container_mime_type,
@ -123,7 +122,7 @@ class BLINK_PLATFORM_EXPORT KeySystemConfigSelector {
bool GetSupportedCapabilities( bool GetSupportedCapabilities(
const std::string& key_system, const std::string& key_system,
media::EmeMediaType media_type, media::EmeMediaType media_type,
const WebVector<WebMediaKeySystemMediaCapability>& const std::vector<WebMediaKeySystemMediaCapability>&
requested_media_capabilities, requested_media_capabilities,
ConfigState* config_state, ConfigState* config_state,
std::vector<WebMediaKeySystemMediaCapability>* std::vector<WebMediaKeySystemMediaCapability>*

@ -27,7 +27,6 @@
#include "third_party/blink/public/platform/web_common.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_private_ptr.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {

@ -39,7 +39,7 @@ class BLINK_EXPORT WebServiceWorkerFetchContext : public WebWorkerFetchContext {
preference_watcher_receiver, preference_watcher_receiver,
CrossVariantMojoReceiver<mojom::SubresourceLoaderUpdaterInterfaceBase> CrossVariantMojoReceiver<mojom::SubresourceLoaderUpdaterInterfaceBase>
pending_subresource_loader_updater, 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); const bool is_third_party_context);
}; };

@ -31,12 +31,12 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_H_ #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_ #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/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/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_callbacks.h"
#include "third_party/blink/public/platform/web_vector.h"
#include <memory>
namespace blink { namespace blink {
@ -73,7 +73,7 @@ class WebServiceWorkerProvider {
const WebServiceWorkerError&>; const WebServiceWorkerError&>;
using WebServiceWorkerGetRegistrationsCallbacks = using WebServiceWorkerGetRegistrationsCallbacks =
WebCallbacks<WebVector<WebServiceWorkerRegistrationObjectInfo>, WebCallbacks<std::vector<WebServiceWorkerRegistrationObjectInfo>,
const WebServiceWorkerError&>; const WebServiceWorkerError&>;
using GetRegistrationForReadyCallback = using GetRegistrationForReadyCallback =
base::OnceCallback<void(WebServiceWorkerRegistrationObjectInfo)>; base::OnceCallback<void(WebServiceWorkerRegistrationObjectInfo)>;

@ -35,7 +35,6 @@
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h" #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/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_common.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {

@ -19,7 +19,6 @@
#include "third_party/blink/public/common/media/video_capture.h" #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/common/mediastream/media_stream_request.h"
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
@ -143,7 +142,7 @@ class BLINK_PLATFORM_EXPORT WebVideoCaptureImplManager {
void UnrefDevice(const media::VideoCaptureSessionId& id); void UnrefDevice(const media::VideoCaptureSessionId& id);
// Devices currently in use. // Devices currently in use.
WebVector<DeviceEntry> devices_; std::vector<DeviceEntry> devices_;
// This is an internal ID for identifying clients of VideoCaptureImpl. // This is an internal ID for identifying clients of VideoCaptureImpl.
// The ID is global for the render process. // The ID is global for the render process.

@ -6,13 +6,13 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_URL_LOADER_THROTTLE_PROVIDER_H_ #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_URL_LOADER_THROTTLE_PROVIDER_H_
#include <memory> #include <memory>
#include <vector>
#include "base/types/optional_ref.h" #include "base/types/optional_ref.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.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/common/tokens/tokens.h"
#include "third_party/blink/public/platform/web_common.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_url_request.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace network { namespace network {
struct ResourceRequest; struct ResourceRequest;
@ -78,7 +78,7 @@ class BLINK_PLATFORM_EXPORT URLLoaderThrottleProvider {
// Dedicated, shared and service workers call it on the worker thread. // Dedicated, shared and service workers call it on the worker thread.
//`local_frame_token` will be set to the corresponding frame for frame and //`local_frame_token` will be set to the corresponding frame for frame and
// dedicated worker requests, otherwise it will not be set. // 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, base::optional_ref<const LocalFrameToken> local_frame_token,
const network::ResourceRequest& request) = 0; const network::ResourceRequest& request) = 0;

@ -32,7 +32,6 @@
#include "media/base/output_device_info.h" #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_audio_sink_descriptor.h"
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {

@ -25,7 +25,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_AUDIO_SOURCE_PROVIDER_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_AUDIO_SOURCE_PROVIDER_H_
#define 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 { namespace blink {
@ -38,7 +38,7 @@ class WebAudioSourceProvider {
// ProvideInput() gets called repeatedly to render time-slices of a continuous // ProvideInput() gets called repeatedly to render time-slices of a continuous
// audio stream. May be called from any thread. // 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; int number_of_frames) = 0;
// If a client is set, we call it back when the audio format is available. // If a client is set, we call it back when the audio format is available.

@ -9,6 +9,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector>
#include "base/functional/callback.h" #include "base/functional/callback.h"
#include "base/functional/callback_forward.h" #include "base/functional/callback_forward.h"
@ -18,7 +19,6 @@
#include "media/base/audio_renderer_sink.h" #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_audio_source_provider.h"
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace media { namespace media {
class MediaLog; class MediaLog;
@ -67,7 +67,7 @@ class BLINK_PLATFORM_EXPORT WebAudioSourceProviderImpl
// WebAudioSourceProvider implementation. // WebAudioSourceProvider implementation.
void SetClient(WebAudioSourceProviderClient* client) override; 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; int number_of_frames) override;
// RestartableAudioRendererSink implementation. // RestartableAudioRendererSink implementation.

@ -31,11 +31,12 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CONTENT_DECRYPTION_MODULE_SESSION_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CONTENT_DECRYPTION_MODULE_SESSION_H_
#define 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_common.h"
#include "third_party/blink/public/platform/web_content_decryption_module_exception.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_content_decryption_module_result.h"
#include "third_party/blink/public/platform/web_encrypted_media_types.h" #include "third_party/blink/public/platform/web_encrypted_media_types.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace media { namespace media {
enum class CdmMessageType; enum class CdmMessageType;
@ -69,7 +70,7 @@ class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession {
// renewed, etc.) and the browser should attempt to resume playback // renewed, etc.) and the browser should attempt to resume playback
// if necessary. // if necessary.
virtual void OnSessionKeysChange( virtual void OnSessionKeysChange(
const WebVector<WebEncryptedMediaKeyInformation>&, const std::vector<WebEncryptedMediaKeyInformation>&,
bool has_additional_usable_key) = 0; bool has_additional_usable_key) = 0;
protected: protected:

@ -32,6 +32,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_H_ #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_H_
#include <string_view> #include <string_view>
#include <vector>
#include "base/containers/span.h" #include "base/containers/span.h"
#include "base/task/single_thread_task_runner.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_crypto_key.h"
#include "third_party/blink/public/platform/web_private_ptr.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_string.h"
#include "third_party/blink/public/platform/web_vector.h"
#if INSIDE_BLINK #if INSIDE_BLINK
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
@ -188,7 +188,7 @@ class WebCrypto {
virtual void Encrypt( virtual void Encrypt(
const WebCryptoAlgorithm&, const WebCryptoAlgorithm&,
const WebCryptoKey&, const WebCryptoKey&,
WebVector<unsigned char> data, std::vector<unsigned char> data,
WebCryptoResult result, WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, ""); result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
@ -196,14 +196,14 @@ class WebCrypto {
virtual void Decrypt( virtual void Decrypt(
const WebCryptoAlgorithm&, const WebCryptoAlgorithm&,
const WebCryptoKey&, const WebCryptoKey&,
WebVector<unsigned char> data, std::vector<unsigned char> data,
WebCryptoResult result, WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, ""); result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
} }
virtual void Sign(const WebCryptoAlgorithm&, virtual void Sign(const WebCryptoAlgorithm&,
const WebCryptoKey&, const WebCryptoKey&,
WebVector<unsigned char> data, std::vector<unsigned char> data,
WebCryptoResult result, WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, ""); result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
@ -211,14 +211,14 @@ class WebCrypto {
virtual void VerifySignature( virtual void VerifySignature(
const WebCryptoAlgorithm&, const WebCryptoAlgorithm&,
const WebCryptoKey&, const WebCryptoKey&,
WebVector<unsigned char> signature, std::vector<unsigned char> signature,
WebVector<unsigned char> data, std::vector<unsigned char> data,
WebCryptoResult result, WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, ""); result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
} }
virtual void Digest(const WebCryptoAlgorithm&, virtual void Digest(const WebCryptoAlgorithm&,
WebVector<unsigned char> data, std::vector<unsigned char> data,
WebCryptoResult result, WebCryptoResult result,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
result.CompleteWithError(kWebCryptoErrorTypeNotSupported, ""); result.CompleteWithError(kWebCryptoErrorTypeNotSupported, "");
@ -233,7 +233,7 @@ class WebCrypto {
} }
virtual void ImportKey( virtual void ImportKey(
WebCryptoKeyFormat, WebCryptoKeyFormat,
WebVector<unsigned char> key_data, std::vector<unsigned char> key_data,
const WebCryptoAlgorithm&, const WebCryptoAlgorithm&,
bool extractable, bool extractable,
WebCryptoKeyUsageMask, WebCryptoKeyUsageMask,
@ -259,7 +259,7 @@ class WebCrypto {
} }
virtual void UnwrapKey( virtual void UnwrapKey(
WebCryptoKeyFormat, WebCryptoKeyFormat,
WebVector<unsigned char> wrapped_key, std::vector<unsigned char> wrapped_key,
const WebCryptoKey&, const WebCryptoKey&,
const WebCryptoAlgorithm& unwrap_algorithm, const WebCryptoAlgorithm& unwrap_algorithm,
const WebCryptoAlgorithm& unwrapped_key_algorithm, const WebCryptoAlgorithm& unwrapped_key_algorithm,
@ -340,10 +340,10 @@ class WebCrypto {
return false; return false;
} }
// Writes the key data into the given WebVector. // Writes the key data into the given std::vector.
// Returns true on success. // Returns true on success.
virtual bool SerializeKeyForClone(const WebCryptoKey&, virtual bool SerializeKeyForClone(const WebCryptoKey&,
WebVector<unsigned char>&) { std::vector<unsigned char>&) {
return false; return false;
} }

@ -33,12 +33,12 @@
#include <cstdint> #include <cstdint>
#include <optional> #include <optional>
#include <vector>
#include "base/check.h" #include "base/check.h"
#include "third_party/blink/public/platform/web_common.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_algorithm.h"
#include "third_party/blink/public/platform/web_crypto_key.h" #include "third_party/blink/public/platform/web_crypto_key.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
@ -63,17 +63,17 @@ class WebCryptoAlgorithmParams {
class WebCryptoAesCbcParams : public WebCryptoAlgorithmParams { class WebCryptoAesCbcParams : public WebCryptoAlgorithmParams {
public: public:
explicit WebCryptoAesCbcParams(WebVector<unsigned char> iv) explicit WebCryptoAesCbcParams(std::vector<unsigned char> iv)
: iv_(std::move(iv)) {} : iv_(std::move(iv)) {}
WebCryptoAlgorithmParamsType GetType() const override { WebCryptoAlgorithmParamsType GetType() const override {
return kWebCryptoAlgorithmParamsTypeAesCbcParams; return kWebCryptoAlgorithmParamsTypeAesCbcParams;
} }
const WebVector<unsigned char>& Iv() const { return iv_; } const std::vector<unsigned char>& Iv() const { return iv_; }
private: private:
const WebVector<unsigned char> iv_; const std::vector<unsigned char> iv_;
}; };
class WebCryptoAlgorithmParamsWithHash : public WebCryptoAlgorithmParams { class WebCryptoAlgorithmParamsWithHash : public WebCryptoAlgorithmParams {
@ -92,7 +92,7 @@ class WebCryptoAlgorithmParamsWithHash : public WebCryptoAlgorithmParams {
class WebCryptoAesCtrParams : public WebCryptoAlgorithmParams { class WebCryptoAesCtrParams : public WebCryptoAlgorithmParams {
public: public:
WebCryptoAesCtrParams(unsigned char length_bits, WebCryptoAesCtrParams(unsigned char length_bits,
WebVector<unsigned char> counter) std::vector<unsigned char> counter)
: WebCryptoAlgorithmParams(), : WebCryptoAlgorithmParams(),
counter_(std::move(counter)), counter_(std::move(counter)),
length_bits_(length_bits) {} length_bits_(length_bits) {}
@ -101,11 +101,11 @@ class WebCryptoAesCtrParams : public WebCryptoAlgorithmParams {
return kWebCryptoAlgorithmParamsTypeAesCtrParams; 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_; } unsigned char LengthBits() const { return length_bits_; }
private: private:
const WebVector<unsigned char> counter_; const std::vector<unsigned char> counter_;
const unsigned char length_bits_; const unsigned char length_bits_;
}; };
@ -181,9 +181,9 @@ class WebCryptoHmacKeyGenParams : public WebCryptoAlgorithmParamsWithHash {
class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams { class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams {
public: public:
WebCryptoAesGcmParams(WebVector<unsigned char> iv, WebCryptoAesGcmParams(std::vector<unsigned char> iv,
bool has_additional_data, bool has_additional_data,
WebVector<unsigned char> additional_data, std::vector<unsigned char> additional_data,
bool has_tag_length_bits, bool has_tag_length_bits,
unsigned char tag_length_bits) unsigned char tag_length_bits)
: iv_(std::move(iv)), : iv_(std::move(iv)),
@ -199,10 +199,10 @@ class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams {
return kWebCryptoAlgorithmParamsTypeAesGcmParams; 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_; } bool HasAdditionalData() const { return has_additional_data_; }
const WebVector<unsigned char>& OptionalAdditionalData() const { const std::vector<unsigned char>& OptionalAdditionalData() const {
return optional_additional_data_; return optional_additional_data_;
} }
@ -210,9 +210,9 @@ class WebCryptoAesGcmParams : public WebCryptoAlgorithmParams {
unsigned OptionalTagLengthBits() const { return optional_tag_length_bits_; } unsigned OptionalTagLengthBits() const { return optional_tag_length_bits_; }
private: private:
const WebVector<unsigned char> iv_; const std::vector<unsigned char> iv_;
const bool has_additional_data_; 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 bool has_tag_length_bits_;
const unsigned char optional_tag_length_bits_; const unsigned char optional_tag_length_bits_;
}; };
@ -231,7 +231,7 @@ class WebCryptoRsaHashedKeyGenParams : public WebCryptoAlgorithmParams {
public: public:
WebCryptoRsaHashedKeyGenParams(const WebCryptoAlgorithm& hash, WebCryptoRsaHashedKeyGenParams(const WebCryptoAlgorithm& hash,
unsigned modulus_length_bits, unsigned modulus_length_bits,
WebVector<unsigned char> public_exponent) std::vector<unsigned char> public_exponent)
: modulus_length_bits_(modulus_length_bits), : modulus_length_bits_(modulus_length_bits),
public_exponent_(std::move(public_exponent)), public_exponent_(std::move(public_exponent)),
hash_(hash) { hash_(hash) {
@ -243,7 +243,7 @@ class WebCryptoRsaHashedKeyGenParams : public WebCryptoAlgorithmParams {
} }
unsigned ModulusLengthBits() const { return modulus_length_bits_; } unsigned ModulusLengthBits() const { return modulus_length_bits_; }
const WebVector<unsigned char>& PublicExponent() const { const std::vector<unsigned char>& PublicExponent() const {
return public_exponent_; return public_exponent_;
} }
const WebCryptoAlgorithm& GetHash() const { return hash_; } const WebCryptoAlgorithm& GetHash() const { return hash_; }
@ -265,13 +265,13 @@ class WebCryptoRsaHashedKeyGenParams : public WebCryptoAlgorithmParams {
private: private:
const unsigned modulus_length_bits_; const unsigned modulus_length_bits_;
const WebVector<unsigned char> public_exponent_; const std::vector<unsigned char> public_exponent_;
const WebCryptoAlgorithm hash_; const WebCryptoAlgorithm hash_;
}; };
class WebCryptoRsaOaepParams : public WebCryptoAlgorithmParams { class WebCryptoRsaOaepParams : public WebCryptoAlgorithmParams {
public: 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)) { : has_label_(has_label), optional_label_(std::move(label)) {
DCHECK(has_label || optional_label_.empty()); DCHECK(has_label || optional_label_.empty());
} }
@ -281,13 +281,13 @@ class WebCryptoRsaOaepParams : public WebCryptoAlgorithmParams {
} }
bool HasLabel() const { return has_label_; } bool HasLabel() const { return has_label_; }
const WebVector<unsigned char>& OptionalLabel() const { const std::vector<unsigned char>& OptionalLabel() const {
return optional_label_; return optional_label_;
} }
private: private:
const bool has_label_; const bool has_label_;
const WebVector<unsigned char> optional_label_; const std::vector<unsigned char> optional_label_;
}; };
class WebCryptoRsaPssParams : public WebCryptoAlgorithmParams { class WebCryptoRsaPssParams : public WebCryptoAlgorithmParams {
@ -378,29 +378,29 @@ class WebCryptoAesDerivedKeyParams : public WebCryptoAlgorithmParams {
class WebCryptoHkdfParams : public WebCryptoAlgorithmParamsWithHash { class WebCryptoHkdfParams : public WebCryptoAlgorithmParamsWithHash {
public: public:
WebCryptoHkdfParams(const WebCryptoAlgorithm& hash, WebCryptoHkdfParams(const WebCryptoAlgorithm& hash,
WebVector<unsigned char> salt, std::vector<unsigned char> salt,
WebVector<unsigned char> info) std::vector<unsigned char> info)
: WebCryptoAlgorithmParamsWithHash(hash), : WebCryptoAlgorithmParamsWithHash(hash),
salt_(std::move(salt)), salt_(std::move(salt)),
info_(std::move(info)) {} 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 { WebCryptoAlgorithmParamsType GetType() const override {
return kWebCryptoAlgorithmParamsTypeHkdfParams; return kWebCryptoAlgorithmParamsTypeHkdfParams;
} }
private: private:
const WebVector<unsigned char> salt_; const std::vector<unsigned char> salt_;
const WebVector<unsigned char> info_; const std::vector<unsigned char> info_;
}; };
class WebCryptoPbkdf2Params : public WebCryptoAlgorithmParamsWithHash { class WebCryptoPbkdf2Params : public WebCryptoAlgorithmParamsWithHash {
public: public:
WebCryptoPbkdf2Params(const WebCryptoAlgorithm& hash, WebCryptoPbkdf2Params(const WebCryptoAlgorithm& hash,
WebVector<unsigned char> salt, std::vector<unsigned char> salt,
unsigned iterations) unsigned iterations)
: WebCryptoAlgorithmParamsWithHash(hash), : WebCryptoAlgorithmParamsWithHash(hash),
salt_(std::move(salt)), salt_(std::move(salt)),
@ -410,11 +410,11 @@ class WebCryptoPbkdf2Params : public WebCryptoAlgorithmParamsWithHash {
return kWebCryptoAlgorithmParamsTypePbkdf2Params; return kWebCryptoAlgorithmParamsTypePbkdf2Params;
} }
const WebVector<unsigned char>& Salt() const { return salt_; } const std::vector<unsigned char>& Salt() const { return salt_; }
unsigned Iterations() const { return iterations_; } unsigned Iterations() const { return iterations_; }
private: private:
const WebVector<unsigned char> salt_; const std::vector<unsigned char> salt_;
const unsigned iterations_; const unsigned iterations_;
}; };

@ -31,10 +31,11 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_KEY_ALGORITHM_PARAMS_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CRYPTO_KEY_ALGORITHM_PARAMS_H_
#define 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 "base/containers/span.h"
#include "third_party/blink/public/platform/web_common.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_algorithm.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
@ -50,7 +51,8 @@ class WebCryptoKeyAlgorithmDictionary {
virtual void SetString(const char*, const char*) = 0; virtual void SetString(const char*, const char*) = 0;
virtual void SetUint(const char*, unsigned) = 0; virtual void SetUint(const char*, unsigned) = 0;
virtual void SetAlgorithm(const char*, const WebCryptoAlgorithm&) = 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 { enum WebCryptoKeyAlgorithmParamsType {
@ -127,7 +129,7 @@ class WebCryptoRsaHashedKeyAlgorithmParams
unsigned ModulusLengthBits() const { return modulus_length_bits_; } unsigned ModulusLengthBits() const { return modulus_length_bits_; }
const WebVector<unsigned char>& PublicExponent() const { const std::vector<unsigned char>& PublicExponent() const {
return public_exponent_; return public_exponent_;
} }
@ -145,7 +147,7 @@ class WebCryptoRsaHashedKeyAlgorithmParams
private: private:
unsigned modulus_length_bits_; unsigned modulus_length_bits_;
WebVector<unsigned char> public_exponent_; std::vector<unsigned char> public_exponent_;
WebCryptoAlgorithm hash_; WebCryptoAlgorithm hash_;
}; };

@ -31,10 +31,11 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DATA_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DATA_H_
#define 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 "base/containers/span.h"
#include "third_party/blink/public/platform/web_common.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_private_ptr.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/renderer/platform/wtf/forward.h" #include "third_party/blink/renderer/platform/wtf/forward.h"
#if INSIDE_BLINK #if INSIDE_BLINK
@ -76,7 +77,7 @@ class BLINK_PLATFORM_EXPORT WebData {
// Same as SharedBuffer::CopyAs, copies the segmented data into a // Same as SharedBuffer::CopyAs, copies the segmented data into a
// contiguous buffer. Use GetSomeData() or ForEachSegment() whenever // contiguous buffer. Use GetSomeData() or ForEachSegment() whenever
// possible, if a copy can be avoided. // 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: // Helper for applying a lambda to all data segments sequentially:
// //

@ -31,6 +31,8 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DRAG_DATA_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DRAG_DATA_H_
#define 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 "base/memory/scoped_refptr.h"
#include "services/network/public/mojom/referrer_policy.mojom-shared.h" #include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/abseil-cpp/absl/types/variant.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_data.h"
#include "third_party/blink/public/platform/web_string.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_url.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
@ -103,9 +104,9 @@ class BLINK_PLATFORM_EXPORT WebDragData {
~WebDragData() = default; ~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&); void AddItem(const Item&);
@ -131,7 +132,7 @@ class BLINK_PLATFORM_EXPORT WebDragData {
} }
private: private:
WebVector<Item> item_list_; std::vector<Item> item_list_;
WebString filesystem_id_; WebString filesystem_id_;
// If true, the renderer always performs the default action for the drop. // 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_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_ICON_SIZES_PARSER_H_
#define 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_common.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace gfx { namespace gfx {
class Size; class Size;
@ -21,7 +22,7 @@ class WebString;
// TODO(zqzhang): merge with WebIconURL, and rename it "WebIcon"? // TODO(zqzhang): merge with WebIconURL, and rename it "WebIcon"?
class BLINK_PLATFORM_EXPORT WebIconSizesParser { class BLINK_PLATFORM_EXPORT WebIconSizesParser {
public: public:
static WebVector<gfx::Size> ParseIconSizes(const WebString& sizes_string); static std::vector<gfx::Size> ParseIconSizes(const WebString& sizes_string);
}; };
} // namespace blink } // namespace blink

@ -5,10 +5,11 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_KEY_SYSTEM_CONFIGURATION_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_KEY_SYSTEM_CONFIGURATION_H_
#define 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 "media/base/eme_constants.h"
#include "third_party/blink/public/platform/web_encrypted_media_types.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_media_key_system_media_capability.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
@ -20,12 +21,12 @@ struct WebMediaKeySystemConfiguration {
}; };
WebString label; WebString label;
WebVector<media::EmeInitDataType> init_data_types; std::vector<media::EmeInitDataType> init_data_types;
WebVector<WebMediaKeySystemMediaCapability> audio_capabilities; std::vector<WebMediaKeySystemMediaCapability> audio_capabilities;
WebVector<WebMediaKeySystemMediaCapability> video_capabilities; std::vector<WebMediaKeySystemMediaCapability> video_capabilities;
Requirement distinctive_identifier = Requirement::kOptional; Requirement distinctive_identifier = Requirement::kOptional;
Requirement persistent_state = Requirement::kOptional; Requirement persistent_state = Requirement::kOptional;
WebVector<WebEncryptedMediaSessionType> session_types; std::vector<WebEncryptedMediaSessionType> session_types;
}; };
} // namespace blink } // namespace blink

@ -331,7 +331,7 @@ class WebMediaPlayer {
virtual void SetIsEffectivelyFullscreen(WebFullscreenVideoStatus) {} virtual void SetIsEffectivelyFullscreen(WebFullscreenVideoStatus) {}
virtual void EnabledAudioTracksChanged( virtual void EnabledAudioTracksChanged(
const WebVector<TrackId>& enabled_track_ids) {} const std::vector<TrackId>& enabled_track_ids) {}
virtual void SelectedVideoTrackChanged( virtual void SelectedVideoTrackChanged(
std::optional<TrackId> selected_track_id) {} std::optional<TrackId> selected_track_id) {}

@ -5,9 +5,10 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_SOURCE_BUFFER_CLIENT_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_SOURCE_BUFFER_CLIENT_H_
#define 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_media_player.h"
#include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {
@ -40,7 +41,7 @@ class WebSourceBufferClient {
// media tracks found in the new init segment. The return value is true in // media tracks found in the new init segment. The return value is true in
// case of success. // case of success.
virtual bool InitializationSegmentReceived( virtual bool InitializationSegmentReceived(
const WebVector<MediaTrackInfo>& tracks) = 0; const std::vector<MediaTrackInfo>& tracks) = 0;
// Notifies SourceBuffer of parse warning. // Notifies SourceBuffer of parse warning.
virtual void NotifyParseWarning(const ParseWarning) = 0; virtual void NotifyParseWarning(const ParseWarning) = 0;

@ -26,11 +26,12 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TEXT_INPUT_INFO_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TEXT_INPUT_INFO_H_
#define 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_common.h"
#include "third_party/blink/public/platform/web_string.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_mode.h"
#include "third_party/blink/public/platform/web_text_input_type.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/ime_text_span.h"
#include "ui/base/ime/mojom/virtual_keyboard_types.mojom-shared.h" #include "ui/base/ime/mojom/virtual_keyboard_types.mojom-shared.h"
#include "ui/base/ime/text_input_action.h" #include "ui/base/ime/text_input_action.h"
@ -76,7 +77,7 @@ struct BLINK_PLATFORM_EXPORT WebTextInputInfo {
ui::mojom::VirtualKeyboardPolicy::AUTO; ui::mojom::VirtualKeyboardPolicy::AUTO;
// The array of ime_text_spans at the current caret position. // 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; bool Equals(const WebTextInputInfo&) const;
}; };

@ -32,9 +32,9 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_ #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_
#include <algorithm> #include <algorithm>
#include <vector>
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_vector.h"
namespace blink { namespace blink {

Some files were not shown because too many files have changed in this diff Show More