diff options
28 files changed, 47 insertions, 50 deletions
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc index cd4d9cf..bc7e026 100644 --- a/android_webview/native/aw_web_contents_delegate.cc +++ b/android_webview/native/aw_web_contents_delegate.cc @@ -180,7 +180,7 @@ void AwWebContentsDelegate::NavigationStateChanged( void AwWebContentsDelegate::WebContentsCreated( WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) { AwContentsIoThreadClientImpl::RegisterPendingContents(new_contents); diff --git a/android_webview/native/aw_web_contents_delegate.h b/android_webview/native/aw_web_contents_delegate.h index e49587e..81695d0 100644 --- a/android_webview/native/aw_web_contents_delegate.h +++ b/android_webview/native/aw_web_contents_delegate.h @@ -43,7 +43,7 @@ class AwWebContentsDelegate content::InvalidateTypes changed_flags) override; void WebContentsCreated(content::WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override; diff --git a/chrome/browser/background/background_contents.h b/chrome/browser/background/background_contents.h index ea284e9..a02d9b1 100644 --- a/chrome/browser/background/background_contents.h +++ b/chrome/browser/background/background_contents.h @@ -125,7 +125,7 @@ struct BackgroundContentsOpenedDetails { BackgroundContents* contents; // The name of the parent frame for these contents. - const base::string16& frame_name; + const std::string& frame_name; // The ID of the parent application (if any). const base::string16& application_id; diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc index de19f74..323a081 100644 --- a/chrome/browser/background/background_contents_service.cc +++ b/chrome/browser/background/background_contents_service.cc @@ -451,7 +451,7 @@ void BackgroundContentsService::OnExtensionLoaded( // EXTENSIONS_READY callback. LoadBackgroundContents(profile, BackgroundInfo::GetBackgroundURL(extension), - base::ASCIIToUTF16("background"), + "background", base::UTF8ToUTF16(extension->id())); } } @@ -568,7 +568,7 @@ void BackgroundContentsService::LoadBackgroundContentsForExtension( if (extension && BackgroundInfo::HasBackgroundPage(extension)) { LoadBackgroundContents(profile, BackgroundInfo::GetBackgroundURL(extension), - base::ASCIIToUTF16("background"), + "background", base::UTF8ToUTF16(extension->id())); return; } @@ -596,7 +596,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromDictionary( dict == NULL) return; - base::string16 frame_name; + std::string frame_name; std::string url; dict->GetString(kUrlKey, &url); dict->GetString(kFrameNameKey, &frame_name); @@ -614,7 +614,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromManifests( BackgroundInfo::HasBackgroundPage(extension.get())) { LoadBackgroundContents( profile, BackgroundInfo::GetBackgroundURL(extension.get()), - base::ASCIIToUTF16("background"), base::UTF8ToUTF16(extension->id())); + "background", base::UTF8ToUTF16(extension->id())); } } } @@ -622,7 +622,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromManifests( void BackgroundContentsService::LoadBackgroundContents( Profile* profile, const GURL& url, - const base::string16& frame_name, + const std::string& frame_name, const base::string16& application_id) { // We are depending on the fact that we will initialize before any user // actions or session restore can take place, so no BackgroundContents should @@ -650,7 +650,7 @@ BackgroundContents* BackgroundContentsService::CreateBackgroundContents( int routing_id, int main_frame_route_id, Profile* profile, - const base::string16& frame_name, + const std::string& frame_name, const base::string16& application_id, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h index 1448af6..725f964c 100644 --- a/chrome/browser/background/background_contents_service.h +++ b/chrome/browser/background/background_contents_service.h @@ -115,7 +115,7 @@ class BackgroundContentsService : private content::NotificationObserver, int route_id, int main_frame_route_id, Profile* profile, - const base::string16& frame_name, + const std::string& frame_name, const base::string16& application_id, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace); @@ -184,7 +184,7 @@ class BackgroundContentsService : private content::NotificationObserver, // and navigates to the passed |url|. void LoadBackgroundContents(Profile* profile, const GURL& url, - const base::string16& frame_name, + const std::string& frame_name, const base::string16& appid); // Invoked when a new BackgroundContents is opened. @@ -228,7 +228,7 @@ class BackgroundContentsService : private content::NotificationObserver, // The BackgroundContents whose information we are tracking. BackgroundContents* contents; // The name of the top level frame for this BackgroundContents. - base::string16 frame_name; + std::string frame_name; }; // Map associating currently loaded BackgroundContents with their parent diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc index 6d726f0..264bdc3d 100644 --- a/chrome/browser/background/background_contents_service_unittest.cc +++ b/chrome/browser/background/background_contents_service_unittest.cc @@ -83,9 +83,8 @@ class MockBackgroundContents : public BackgroundContents { } void SendOpenedNotification(BackgroundContentsService* service) { - base::string16 frame_name = base::ASCIIToUTF16("background"); BackgroundContentsOpenedDetails details = { - this, frame_name, appid_ }; + this, "background", appid_ }; service->BackgroundContentsOpened(&details, profile_); } diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc index c2d0de6..5f9b86bc 100644 --- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc +++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc @@ -166,7 +166,7 @@ class DriveWebContentsManager : public content::WebContentsObserver, int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) override; @@ -282,11 +282,10 @@ bool DriveWebContentsManager::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { - if (window_container_type == WINDOW_CONTAINER_TYPE_NORMAL) return true; diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc index f25425c..23e8e80c 100644 --- a/chrome/browser/devtools/devtools_window.cc +++ b/chrome/browser/devtools/devtools_window.cc @@ -885,7 +885,7 @@ void DevToolsWindow::AddNewContents(WebContents* source, void DevToolsWindow::WebContentsCreated(WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, WebContents* new_contents) { if (target_url.SchemeIs(content::kChromeDevToolsScheme) && diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h index acec32c..c95bffb 100644 --- a/chrome/browser/devtools/devtools_window.h +++ b/chrome/browser/devtools/devtools_window.h @@ -259,7 +259,7 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate, bool* was_blocked) override; void WebContentsCreated(content::WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override; void CloseContents(content::WebContents* source) override; diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc b/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc index 1e8e2d1..2ccd614 100644 --- a/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc +++ b/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc @@ -310,7 +310,7 @@ bool OffscreenPresentation::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_presentation.h b/chrome/browser/extensions/api/tab_capture/offscreen_presentation.h index 1ba4be9..03ca5c2 100644 --- a/chrome/browser/extensions/api/tab_capture/offscreen_presentation.h +++ b/chrome/browser/extensions/api/tab_capture/offscreen_presentation.h @@ -146,7 +146,7 @@ class OffscreenPresentation : protected content::WebContentsDelegate, int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) final; diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc index d9da339..7d8d9ff 100644 --- a/chrome/browser/prerender/prerender_contents.cc +++ b/chrome/browser/prerender/prerender_contents.cc @@ -117,7 +117,7 @@ class PrerenderContents::WebContentsDelegateImpl int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, SessionStorageNamespace* session_storage_namespace) override { diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 5ecf9ef..f589307 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1664,7 +1664,7 @@ bool Browser::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { @@ -1684,7 +1684,7 @@ bool Browser::ShouldCreateWebContents( void Browser::WebContentsCreated(WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, WebContents* new_contents) { // Adopt the WebContents now, so all observers are in place, as the network @@ -2602,7 +2602,7 @@ bool Browser::MaybeCreateBackgroundContents( int route_id, int main_frame_route_id, WebContents* opener_web_contents, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index e239423..9bb2137 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -590,13 +590,13 @@ class Browser : public TabStripModelObserver, int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) override; void WebContentsCreated(content::WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override; void RendererUnresponsive(content::WebContents* source) override; @@ -833,7 +833,7 @@ class Browser : public TabStripModelObserver, int route_id, int main_frame_route_id, content::WebContents* opener_web_contents, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace); diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.cc b/components/web_contents_delegate_android/web_contents_delegate_android.cc index 78d7056..7606051 100644 --- a/components/web_contents_delegate_android/web_contents_delegate_android.cc +++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc @@ -221,7 +221,7 @@ bool WebContentsDelegateAndroid::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { @@ -246,7 +246,7 @@ bool WebContentsDelegateAndroid::OnGoToEntryOffset(int offset) { void WebContentsDelegateAndroid::WebContentsCreated( WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, const GURL& target_url, + const std::string& frame_name, const GURL& target_url, WebContents* new_contents) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); @@ -265,7 +265,7 @@ void WebContentsDelegateAndroid::WebContentsCreated( obj.obj(), jsource_contents.obj(), opener_render_frame_id, - base::android::ConvertUTF16ToJavaString(env, frame_name).Release(), + base::android::ConvertUTF8ToJavaString(env, frame_name).Release(), base::android::ConvertUTF8ToJavaString(env, target_url.spec()).Release(), jnew_contents.obj()); } diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.h b/components/web_contents_delegate_android/web_contents_delegate_android.h index f83e189..8f31444 100644 --- a/components/web_contents_delegate_android/web_contents_delegate_android.h +++ b/components/web_contents_delegate_android/web_contents_delegate_android.h @@ -71,7 +71,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { void RendererResponsive(content::WebContents* source) override; void WebContentsCreated(content::WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override; bool ShouldCreateWebContents( @@ -79,7 +79,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) override; diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index bd80abd..55d2e57 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -1687,7 +1687,7 @@ void WebContentsImpl::CreateNewWindow( CreateParams create_params(GetBrowserContext(), site_instance.get()); create_params.routing_id = route_id; create_params.main_frame_routing_id = main_frame_route_id; - create_params.main_frame_name = base::UTF16ToUTF8(params.frame_name); + create_params.main_frame_name = params.frame_name; create_params.opener_render_process_id = GetRenderProcessHost()->GetID(); create_params.opener_render_frame_id = params.opener_render_frame_id; create_params.opener_suppressed = params.opener_suppressed; diff --git a/content/common/view_messages.h b/content/common/view_messages.h index fcacbce..7433e50 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -315,8 +315,8 @@ IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) // The name of the resulting frame that should be created (empty if none - // has been specified). - IPC_STRUCT_MEMBER(base::string16, frame_name) + // has been specified). UTF8 encoded string. + IPC_STRUCT_MEMBER(std::string, frame_name) // The routing id of the frame initiating the open. IPC_STRUCT_MEMBER(int, opener_render_frame_id) diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc index 70f12f6..016097b 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -135,7 +135,7 @@ bool WebContentsDelegate::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, SessionStorageNamespace* session_storage_namespace) { diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index 34d39f7..34ddd26 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -295,7 +295,7 @@ class CONTENT_EXPORT WebContentsDelegate { int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); @@ -304,7 +304,7 @@ class CONTENT_EXPORT WebContentsDelegate { // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, WebContents* new_contents) {} diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index aab88a8..72705a7 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -1550,7 +1550,7 @@ WebView* RenderViewImpl::createView(WebLocalFrame* creator, params.window_container_type = WindowFeaturesToContainerType(features); params.session_storage_namespace_id = session_storage_namespace_id_; if (frame_name != "_blank") - params.frame_name = frame_name; + params.frame_name = base::UTF16ToUTF8(frame_name); params.opener_render_frame_id = RenderFrameImpl::FromWebFrame(creator)->GetRoutingID(); params.opener_url = creator->document().url(); diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc index 339906a..b5ed791 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc @@ -196,7 +196,7 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h index 088c78b..78b7ec2 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h @@ -46,7 +46,7 @@ class ExtensionOptionsGuest int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) override; diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc index 3d5f31e..fbf9286 100644 --- a/extensions/browser/guest_view/web_view/web_view_guest.cc +++ b/extensions/browser/guest_view/web_view/web_view_guest.cc @@ -1283,16 +1283,15 @@ content::WebContents* WebViewGuest::OpenURLFromTab( void WebViewGuest::WebContentsCreated(WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) { auto guest = WebViewGuest::FromWebContents(new_contents); CHECK(guest); guest->SetOpener(this); - std::string guest_name = base::UTF16ToUTF8(frame_name); - guest->name_ = guest_name; + guest->name_ = frame_name; pending_new_windows_.insert( - std::make_pair(guest, NewWindowInfo(target_url, guest_name))); + std::make_pair(guest, NewWindowInfo(target_url, frame_name))); } void WebViewGuest::EnterFullscreenModeForTab(content::WebContents* web_contents, diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h index e566fb4..892a2fc 100644 --- a/extensions/browser/guest_view/web_view/web_view_guest.h +++ b/extensions/browser/guest_view/web_view/web_view_guest.h @@ -181,7 +181,7 @@ class WebViewGuest : public guest_view::GuestView<WebViewGuest>, const content::OpenURLParams& params) override; void WebContentsCreated(content::WebContents* source_contents, int opener_render_frame_id, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override; void EnterFullscreenModeForTab(content::WebContents* web_contents, diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc index 6b6483c..3671b02 100644 --- a/ui/keyboard/keyboard_controller_proxy.cc +++ b/ui/keyboard/keyboard_controller_proxy.cc @@ -56,7 +56,7 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate, int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) override { diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc index 4a5a114..4b5e8b2 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc @@ -337,7 +337,7 @@ bool WebDialogView::ShouldCreateWebContents( int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) { diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h index 22550dd..dc6598d 100644 --- a/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h @@ -116,7 +116,7 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView, int route_id, int main_frame_route_id, WindowContainerType window_container_type, - const base::string16& frame_name, + const std::string& frame_name, const GURL& target_url, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace) override; |