diff options
Diffstat (limited to 'content/browser/web_contents')
23 files changed, 79 insertions, 77 deletions
diff --git a/content/browser/web_contents/touch_editable_impl_aura.cc b/content/browser/web_contents/touch_editable_impl_aura.cc index 6f85625..ed002c7 100644 --- a/content/browser/web_contents/touch_editable_impl_aura.cc +++ b/content/browser/web_contents/touch_editable_impl_aura.cc @@ -307,7 +307,7 @@ bool TouchEditableImplAura::IsCommandIdEnabled(int command_id) const { case IDS_APP_COPY: return has_selection; case IDS_APP_PASTE: { - string16 result; + base::string16 result; ui::Clipboard::GetForCurrentThread()->ReadText( ui::CLIPBOARD_TYPE_COPY_PASTE, &result); return editable && !result.empty(); diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc index 3a59057..ffc8713 100644 --- a/content/browser/web_contents/web_contents_drag_win.cc +++ b/content/browser/web_contents/web_contents_drag_win.cc @@ -227,7 +227,7 @@ void WebContentsDragWin::PrepareDragForDownload( const GURL& page_url, const std::string& page_encoding) { // Parse the download metadata. - string16 mime_type; + base::string16 mime_type; base::FilePath file_name; GURL download_url; if (!ParseDownloadMetadata(drop_data.download_metadata, @@ -284,7 +284,7 @@ void WebContentsDragWin::PrepareDragForFileContents( // Images without ALT text will only have a file extension so we need to // synthesize one from the provided extension and URL. if (file_name.BaseName().RemoveExtension().empty()) { - const string16 extension = file_name.Extension(); + const base::string16 extension = file_name.Extension(); // Retrieve the name from the URL. file_name = base::FilePath( net::GetSuggestedFilename(drop_data.url, "", "", "", "", "")); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index e05cab0..7d04a60 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -348,7 +348,7 @@ WebContentsImpl::WebContentsImpl( crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), crashed_error_code_(0), waiting_for_response_(false), - load_state_(net::LOAD_STATE_IDLE, string16()), + load_state_(net::LOAD_STATE_IDLE, base::string16()), upload_size_(0), upload_position_(0), displayed_insecure_content_(false), @@ -727,7 +727,7 @@ gfx::NativeViewAccessible accessible_parent) { } #endif -const string16& WebContentsImpl::GetTitle() const { +const base::string16& WebContentsImpl::GetTitle() const { // Transient entries take precedence. They are used for interstitial pages // that are shown on top of existing pages. NavigationEntry* entry = controller_.GetTransientEntry(); @@ -744,7 +744,7 @@ const string16& WebContentsImpl::GetTitle() const { entry = controller_.GetVisibleEntry(); if (!(entry && entry->IsViewSourceMode())) { // Give the Web UI the chance to override our title. - const string16& title = our_web_ui->GetOverriddenTitle(); + const base::string16& title = our_web_ui->GetOverriddenTitle(); if (!title.empty()) return title; } @@ -832,7 +832,7 @@ const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const { return load_state_; } -const string16& WebContentsImpl::GetLoadStateHost() const { +const base::string16& WebContentsImpl::GetLoadStateHost() const { return load_state_host_; } @@ -2219,7 +2219,7 @@ void WebContentsImpl::OnDidFailLoadWithError( const GURL& url, bool is_main_frame, int error_code, - const string16& error_description) { + const base::string16& error_description) { GURL validated_url(url); RenderProcessHost* render_process_host = message_source_->GetProcess(); RenderViewHost::FilterURL(render_process_host, false, &validated_url); @@ -2280,7 +2280,7 @@ void WebContentsImpl::OnJSOutOfMemory() { void WebContentsImpl::OnRegisterProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title, + const base::string16& title, bool user_gesture) { if (!delegate_) return; @@ -2516,7 +2516,8 @@ void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host, return; if (!is_loading) { - load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); + load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, + base::string16()); load_state_host_.clear(); upload_size_ = 0; upload_position_ = 0; @@ -2618,11 +2619,11 @@ void WebContentsImpl::UpdateMaxPageIDIfNecessary(RenderViewHost* rvh) { } bool WebContentsImpl::UpdateTitleForEntry(NavigationEntryImpl* entry, - const string16& title) { + const base::string16& title) { // For file URLs without a title, use the pathname instead. In the case of a // synthesized title, we don't want the update to count toward the "one set // per page of the title to history." - string16 final_title; + base::string16 final_title; bool explicit_set; if (entry && entry->GetURL().SchemeIsFile() && title.empty()) { final_title = UTF8ToUTF16(entry->GetURL().ExtractFileName()); @@ -2975,7 +2976,7 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh, void WebContentsImpl::UpdateTitle(RenderViewHost* rvh, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) { // If we have a title, that's a pretty good indication that we've started // getting useful data. @@ -3291,8 +3292,8 @@ void WebContentsImpl::RouteMessageEvent( void WebContentsImpl::RunJavaScriptMessage( RenderViewHost* rvh, - const string16& message, - const string16& default_prompt, + const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType javascript_message_type, IPC::Message* reply_msg, @@ -3330,7 +3331,7 @@ void WebContentsImpl::RunJavaScriptMessage( if (suppress_this_message) { // If we are suppressing messages, just reply as if the user immediately // pressed "Cancel". - OnDialogClosed(rvh, reply_msg, false, string16()); + OnDialogClosed(rvh, reply_msg, false, base::string16()); } // OnDialogClosed (two lines up) may have caused deletion of this object (see @@ -3338,7 +3339,7 @@ void WebContentsImpl::RunJavaScriptMessage( } void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg) { RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(rvh); @@ -3352,7 +3353,7 @@ void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh, !delegate_->GetJavaScriptDialogManager(); if (suppress_this_message) { // The reply must be sent to the RVH that sent the request. - rvhi->JavaScriptDialogClosed(reply_msg, true, string16()); + rvhi->JavaScriptDialogClosed(reply_msg, true, base::string16()); return; } @@ -3365,9 +3366,9 @@ void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh, } bool WebContentsImpl::AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { if (!delegate_) return false; return delegate_->AddMessageToConsole(this, level, message, line_no, @@ -3590,7 +3591,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager( GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); if (!static_cast<RenderViewHostImpl*>( - render_view_host)->CreateRenderView(string16(), + render_view_host)->CreateRenderView(base::string16(), opener_route_id, max_page_id)) { return false; @@ -3618,7 +3619,7 @@ bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() { void WebContentsImpl::OnDialogClosed(RenderViewHost* rvh, IPC::Message* reply_msg, bool success, - const string16& user_input) { + const base::string16& user_input) { if (is_showing_before_unload_dialog_ && !success) { // If a beforeunload dialog is canceled, we need to stop the throbber from // spinning, since we forced it to start spinning in Navigate. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 7229682..d2c0483 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -193,7 +193,7 @@ class CONTENT_EXPORT WebContentsImpl virtual void SetParentNativeViewAccessible( gfx::NativeViewAccessible accessible_parent) OVERRIDE; #endif - virtual const string16& GetTitle() const OVERRIDE; + virtual const base::string16& GetTitle() const OVERRIDE; virtual int32 GetMaxPageID() OVERRIDE; virtual int32 GetMaxPageIDForSiteInstance( SiteInstance* site_instance) OVERRIDE; @@ -202,7 +202,7 @@ class CONTENT_EXPORT WebContentsImpl virtual bool IsLoading() const OVERRIDE; virtual bool IsWaitingForResponse() const OVERRIDE; virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; - virtual const string16& GetLoadStateHost() const OVERRIDE; + virtual const base::string16& GetLoadStateHost() const OVERRIDE; virtual uint64 GetUploadSize() const OVERRIDE; virtual uint64 GetUploadPosition() const OVERRIDE; virtual std::set<GURL> GetSitesInTab() const OVERRIDE; @@ -318,7 +318,7 @@ class CONTENT_EXPORT WebContentsImpl const PageState& page_state) OVERRIDE; virtual void UpdateTitle(RenderViewHost* render_view_host, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) OVERRIDE; virtual void UpdateEncoding(RenderViewHost* render_view_host, const std::string& encoding) OVERRIDE; @@ -359,20 +359,20 @@ class CONTENT_EXPORT WebContentsImpl RenderViewHost* rvh, const ViewMsg_PostMessage_Params& params) OVERRIDE; virtual void RunJavaScriptMessage(RenderViewHost* rvh, - const string16& message, - const string16& default_prompt, + const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType type, IPC::Message* reply_msg, bool* did_suppress_message) OVERRIDE; virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg) OVERRIDE; virtual bool AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) OVERRIDE; + const base::string16& source_id) OVERRIDE; virtual RendererPreferences GetRendererPrefs( BrowserContext* browser_context) const OVERRIDE; virtual WebPreferences GetWebkitPrefs() OVERRIDE; @@ -594,7 +594,7 @@ class CONTENT_EXPORT WebContentsImpl void OnDialogClosed(RenderViewHost* rvh, IPC::Message* reply_msg, bool success, - const string16& user_input); + const base::string16& user_input); // Callback function when requesting permission to access the PPAPI broker. // |result| is true if permission was granted. @@ -617,7 +617,7 @@ class CONTENT_EXPORT WebContentsImpl const GURL& url, bool is_main_frame, int error_code, - const string16& error_description); + const base::string16& error_description); void OnGoToEntryAtOffset(int offset); void OnUpdateZoomLimits(int minimum_percent, int maximum_percent, @@ -627,7 +627,7 @@ class CONTENT_EXPORT WebContentsImpl void OnRegisterProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title, + const base::string16& title, bool user_gesture); void OnFindReply(int request_id, int number_of_matches, @@ -714,7 +714,7 @@ class CONTENT_EXPORT WebContentsImpl // or the dedicated set title message. It returns true if the new title is // different and was therefore updated. bool UpdateTitleForEntry(NavigationEntryImpl* entry, - const string16& title); + const base::string16& title); // Causes the WebContentsImpl to navigate in the right renderer to |entry|, // which must be already part of the entries in the navigation controller. @@ -876,7 +876,7 @@ class CONTENT_EXPORT WebContentsImpl // The current load state and the URL associated with it. net::LoadStateWithParam load_state_; - string16 load_state_host_; + base::string16 load_state_host_; // Upload progress, for displaying in the status bar. // Set to zero when there is no significant upload happening. uint64 upload_size_; @@ -885,7 +885,7 @@ class CONTENT_EXPORT WebContentsImpl // Data for current page ----------------------------------------------------- // When a title cannot be taken from any entry, this title will be used. - string16 page_title_when_no_navigation_entry_; + base::string16 page_title_when_no_navigation_entry_; // When a navigation occurs, we record its contents MIME type. It can be // used to check whether we can do something for some special contents. diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc index d5ac705..01c0191 100644 --- a/content/browser/web_contents/web_contents_impl_unittest.cc +++ b/content/browser/web_contents/web_contents_impl_unittest.cc @@ -284,7 +284,7 @@ class TestWebContentsObserver : public WebContentsObserver { const GURL& validated_url, bool is_main_frame, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) OVERRIDE { last_url_ = validated_url; } @@ -318,12 +318,12 @@ TEST_F(WebContentsImplTest, DontUseTitleFromPendingEntry) { const GURL kGURL("chrome://blah"); controller().LoadURL( kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string()); - EXPECT_EQ(string16(), contents()->GetTitle()); + EXPECT_EQ(base::string16(), contents()->GetTitle()); } TEST_F(WebContentsImplTest, UseTitleFromPendingEntryIfSet) { const GURL kGURL("chrome://blah"); - const string16 title = ASCIIToUTF16("My Title"); + const base::string16 title = ASCIIToUTF16("My Title"); controller().LoadURL( kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string()); @@ -2152,7 +2152,7 @@ TEST_F(WebContentsImplTest, FilterURLs) { // Check that an IPC with about:whatever is correctly normalized. other_contents->TestDidFailLoadWithError( - 1, url_from_ipc, true, 1, string16()); + 1, url_from_ipc, true, 1, base::string16()); EXPECT_EQ(url_normalized, other_observer.last_url()); } diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc index fc27ace..f66b5ec 100644 --- a/content/browser/web_contents/web_contents_view_android.cc +++ b/content/browser/web_contents/web_contents_view_android.cc @@ -80,7 +80,7 @@ void WebContentsViewAndroid::GetContainerBounds(gfx::Rect* out) const { *out = rwhv->GetViewBounds(); } -void WebContentsViewAndroid::SetPageTitle(const string16& title) { +void WebContentsViewAndroid::SetPageTitle(const base::string16& title) { if (content_view_core_) content_view_core_->SetTitle(title); } diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_android.h index bcfc0cf..849ca6d 100644 --- a/content/browser/web_contents/web_contents_view_android.h +++ b/content/browser/web_contents/web_contents_view_android.h @@ -57,7 +57,7 @@ class WebContentsViewAndroid : public WebContentsViewPort, RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 353da78..75ca4e6 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -249,7 +249,7 @@ void PrepareDragForFileContents(const DropData& drop_data, // Images without ALT text will only have a file extension so we need to // synthesize one from the provided extension and URL. if (file_name.BaseName().RemoveExtension().empty()) { - const string16 extension = file_name.Extension(); + const base::string16 extension = file_name.Extension(); // Retrieve the name from the URL. file_name = base::FilePath(net::GetSuggestedFilename( drop_data.url, "", "", "", "", "")).ReplaceExtension(extension); @@ -296,20 +296,20 @@ void PrepareDragData(const DropData& drop_data, // Utility to fill a DropData object from ui::OSExchangeData. void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { - string16 plain_text; + base::string16 plain_text; data.GetString(&plain_text); if (!plain_text.empty()) drop_data->text = base::NullableString16(plain_text, false); GURL url; - string16 url_title; + base::string16 url_title; data.GetURLAndTitle(&url, &url_title); if (url.is_valid()) { drop_data->url = url; drop_data->url_title = url_title; } - string16 html; + base::string16 html; GURL html_base_url; data.GetHtml(&html, &html_base_url); if (!html.empty()) @@ -1298,7 +1298,7 @@ RenderWidgetHostView* WebContentsViewAura::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewAura::SetPageTitle(const string16& title) { +void WebContentsViewAura::SetPageTitle(const base::string16& title) { window_->set_title(title); } diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h index 7d377b0..a0597d3 100644 --- a/content/browser/web_contents/web_contents_view_aura.h +++ b/content/browser/web_contents/web_contents_view_aura.h @@ -118,7 +118,7 @@ class CONTENT_EXPORT WebContentsViewAura RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc index 3214c13..687ce57 100644 --- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc +++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc @@ -196,14 +196,14 @@ class WebContentsViewAuraTest : public ContentBrowserTest { { // Do a swipe-right now. That should navigate backwards. - string16 expected_title = ASCIIToUTF16("Title: #1"); + base::string16 expected_title = ASCIIToUTF16("Title: #1"); content::TitleWatcher title_watcher(web_contents, expected_title); generator.GestureScrollSequence( gfx::Point(bounds.x() + 2, bounds.y() + 10), gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(kScrollDurationMs), kScrollSteps); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); value = content::ExecuteScriptAndGetValue(view_host, "get_current()"); ASSERT_TRUE(value->GetAsInteger(&index)); @@ -214,14 +214,14 @@ class WebContentsViewAuraTest : public ContentBrowserTest { { // Do a fling-right now. That should navigate backwards. - string16 expected_title = ASCIIToUTF16("Title:"); + base::string16 expected_title = ASCIIToUTF16("Title:"); content::TitleWatcher title_watcher(web_contents, expected_title); generator.GestureScrollSequence( gfx::Point(bounds.x() + 2, bounds.y() + 10), gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(kScrollDurationMs), kScrollSteps); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); value = content::ExecuteScriptAndGetValue(view_host, "get_current()"); ASSERT_TRUE(value->GetAsInteger(&index)); @@ -232,14 +232,14 @@ class WebContentsViewAuraTest : public ContentBrowserTest { { // Do a swipe-left now. That should navigate forward. - string16 expected_title = ASCIIToUTF16("Title: #1"); + base::string16 expected_title = ASCIIToUTF16("Title: #1"); content::TitleWatcher title_watcher(web_contents, expected_title); generator.GestureScrollSequence( gfx::Point(bounds.right() - 10, bounds.y() + 10), gfx::Point(bounds.x() + 2, bounds.y() + 10), base::TimeDelta::FromMilliseconds(kScrollDurationMs), kScrollSteps); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); value = content::ExecuteScriptAndGetValue(view_host, "get_current()"); ASSERT_TRUE(value->GetAsInteger(&index)); @@ -438,7 +438,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) { { // Now, swipe right to navigate backwards. This should navigate away from // index 3 to index 2, and index 3 should have a screenshot. - string16 expected_title = ASCIIToUTF16("Title: #2"); + base::string16 expected_title = ASCIIToUTF16("Title: #2"); content::TitleWatcher title_watcher(web_contents, expected_title); aura::Window* content = web_contents->GetView()->GetContentNativeView(); gfx::Rect bounds = content->GetBoundsInRootWindow(); @@ -448,7 +448,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) { gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(20), 1); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); EXPECT_EQ(2, GetCurrentIndex()); screenshot_manager()->WaitUntilScreenshotIsReady(); @@ -469,10 +469,10 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) { { // Navigate back in history. - string16 expected_title = ASCIIToUTF16("Title: #3"); + base::string16 expected_title = ASCIIToUTF16("Title: #3"); content::TitleWatcher title_watcher(web_contents, expected_title); web_contents->GetController().GoBack(); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); EXPECT_EQ(3, GetCurrentIndex()); screenshot_manager()->WaitUntilScreenshotIsReady(); @@ -641,7 +641,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, // Do a swipe left to start a forward navigation. Then quickly do a swipe // right. - string16 expected_title = ASCIIToUTF16("Title: #2"); + base::string16 expected_title = ASCIIToUTF16("Title: #2"); content::TitleWatcher title_watcher(web_contents, expected_title); NavigationWatcher nav_watcher(web_contents); @@ -657,7 +657,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(2000), 10); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); EXPECT_EQ(2, GetCurrentIndex()); diff --git a/content/browser/web_contents/web_contents_view_gtk.cc b/content/browser/web_contents/web_contents_view_gtk.cc index 4e3874f..bf4dcb7f 100644 --- a/content/browser/web_contents/web_contents_view_gtk.cc +++ b/content/browser/web_contents/web_contents_view_gtk.cc @@ -246,7 +246,7 @@ RenderWidgetHostView* WebContentsViewGtk::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewGtk::SetPageTitle(const string16& title) { +void WebContentsViewGtk::SetPageTitle(const base::string16& title) { // Set the window name to include the page title so it's easier to spot // when debugging (e.g. via xwininfo -tree). gfx::NativeView content_view = GetContentNativeView(); diff --git a/content/browser/web_contents/web_contents_view_gtk.h b/content/browser/web_contents/web_contents_view_gtk.h index 41f84ab..7a8d25e 100644 --- a/content/browser/web_contents/web_contents_view_gtk.h +++ b/content/browser/web_contents/web_contents_view_gtk.h @@ -66,7 +66,7 @@ class CONTENT_EXPORT WebContentsViewGtk RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc index ac236da..90296a9 100644 --- a/content/browser/web_contents/web_contents_view_guest.cc +++ b/content/browser/web_contents/web_contents_view_guest.cc @@ -142,7 +142,7 @@ RenderWidgetHostView* WebContentsViewGuest::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewGuest::SetPageTitle(const string16& title) { +void WebContentsViewGuest::SetPageTitle(const base::string16& title) { } void WebContentsViewGuest::RenderViewCreated(RenderViewHost* host) { diff --git a/content/browser/web_contents/web_contents_view_guest.h b/content/browser/web_contents/web_contents_view_guest.h index 1e1d812..976a04e 100644 --- a/content/browser/web_contents/web_contents_view_guest.h +++ b/content/browser/web_contents/web_contents_view_guest.h @@ -65,7 +65,7 @@ class CONTENT_EXPORT WebContentsViewGuest RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h index 3d0b94f..a8ffab4 100644 --- a/content/browser/web_contents/web_contents_view_mac.h +++ b/content/browser/web_contents/web_contents_view_mac.h @@ -88,7 +88,7 @@ class WebContentsViewMac : public WebContentsViewPort, RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm index 4283ca9..e80bf99 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm @@ -332,7 +332,7 @@ RenderWidgetHostView* WebContentsViewMac::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewMac::SetPageTitle(const string16& title) { +void WebContentsViewMac::SetPageTitle(const base::string16& title) { // Meaningless on the Mac; widgets don't have a "title" attribute } diff --git a/content/browser/web_contents/web_contents_view_win.cc b/content/browser/web_contents/web_contents_view_win.cc index 92548d2..8360d8c 100644 --- a/content/browser/web_contents/web_contents_view_win.cc +++ b/content/browser/web_contents/web_contents_view_win.cc @@ -228,7 +228,7 @@ RenderWidgetHostView* WebContentsViewWin::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewWin::SetPageTitle(const string16& title) { +void WebContentsViewWin::SetPageTitle(const base::string16& title) { // It's possible to get this after the hwnd has been destroyed. if (GetNativeView()) ::SetWindowText(GetNativeView(), title.c_str()); diff --git a/content/browser/web_contents/web_contents_view_win.h b/content/browser/web_contents/web_contents_view_win.h index 505addd..9b052e2 100644 --- a/content/browser/web_contents/web_contents_view_win.h +++ b/content/browser/web_contents/web_contents_view_win.h @@ -73,7 +73,7 @@ class CONTENT_EXPORT WebContentsViewWin RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_drag_dest_gtk.cc b/content/browser/web_contents/web_drag_dest_gtk.cc index bb9a4d4..738d6b5 100644 --- a/content/browser/web_contents/web_drag_dest_gtk.cc +++ b/content/browser/web_contents/web_drag_dest_gtk.cc @@ -204,7 +204,8 @@ void WebDragDestGtk::OnDragDataReceived( if (url.SchemeIs(chrome::kFileScheme) && net::FileURLToFilePath(url, &file_path)) { drop_data_->filenames.push_back( - DropData::FileInfo(UTF8ToUTF16(file_path.value()), string16())); + DropData::FileInfo(UTF8ToUTF16(file_path.value()), + base::string16())); // This is a hack. Some file managers also populate text/plain with // a file URL when dragging files, so we clear it to avoid exposing // it to the web content. diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm index b3fefca..8768bed 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -290,7 +290,7 @@ int GetModifierFlags() { if (exists) { data->filenames.push_back( DropData::FileInfo( - base::SysNSStringToUTF16(filename), string16())); + base::SysNSStringToUTF16(filename), base::string16())); } } } diff --git a/content/browser/web_contents/web_drag_dest_mac_unittest.mm b/content/browser/web_contents/web_drag_dest_mac_unittest.mm index 48719de..b79c118 100644 --- a/content/browser/web_contents/web_drag_dest_mac_unittest.mm +++ b/content/browser/web_contents/web_drag_dest_mac_unittest.mm @@ -85,7 +85,7 @@ TEST_F(WebDragDestTest, URL) { NSString* url = nil; NSString* title = nil; GURL result_url; - string16 result_title; + base::string16 result_title; // Put a URL on the pasteboard and check it. pboard = [NSPasteboard pasteboardWithUniqueName]; diff --git a/content/browser/web_contents/web_drag_source_gtk.h b/content/browser/web_contents/web_drag_source_gtk.h index 577f60b..8a7c7b2 100644 --- a/content/browser/web_contents/web_drag_source_gtk.h +++ b/content/browser/web_contents/web_drag_source_gtk.h @@ -92,7 +92,7 @@ class CONTENT_EXPORT WebDragSourceGtk : GdkDragContext* drag_context_; // The file mime type for a drag-out download. - string16 wide_download_mime_type_; + base::string16 wide_download_mime_type_; // The file name to be saved to for a drag-out download. base::FilePath download_file_name_; diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm index 805e73b..c667320 100644 --- a/content/browser/web_contents/web_drag_source_mac.mm +++ b/content/browser/web_contents/web_drag_source_mac.mm @@ -49,10 +49,10 @@ namespace { // |NSURLPboardType|. NSString* const kNSURLTitlePboardType = @"public.url-name"; -// Converts a string16 into a FilePath. Use this method instead of +// Converts a base::string16 into a FilePath. Use this method instead of // -[NSString fileSystemRepresentation] to prevent exceptions from being thrown. // See http://crbug.com/78782 for more info. -base::FilePath FilePathFromFilename(const string16& filename) { +base::FilePath FilePathFromFilename(const base::string16& filename) { NSString* str = SysUTF16ToNSString(filename); char buf[MAXPATHLEN]; if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)]) @@ -71,7 +71,7 @@ base::FilePath GetFileNameFromDragData(const DropData& drop_data) { // synthesize one from the provided extension and URL. if (file_name.empty()) { // Retrieve the name from the URL. - string16 suggested_filename = + base::string16 suggested_filename = net::GetSuggestedFilename(drop_data.url, "", "", "", "", ""); const std::string extension = file_name.Extension(); file_name = FilePathFromFilename(suggested_filename); @@ -147,7 +147,7 @@ void PromiseWriterHelper(const DropData& drop_data, - (void)lazyWriteToPasteboard:(NSPasteboard*)pboard forType:(NSString*)type { // NSHTMLPboardType requires the character set to be declared. Otherwise, it // assumes US-ASCII. Awesome. - const string16 kHtmlHeader = ASCIIToUTF16( + const base::string16 kHtmlHeader = ASCIIToUTF16( "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"); // Be extra paranoid; avoid crashing. @@ -386,7 +386,7 @@ void PromiseWriterHelper(const DropData& drop_data, downloadFileName_ = GetFileNameFromDragData(*dropData_); net::GetMimeTypeFromExtension(downloadFileName_.Extension(), &mimeType); } else { - string16 mimeType16; + base::string16 mimeType16; base::FilePath fileName; if (content::ParseDownloadMetadata( dropData_->download_metadata, |