Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 11968054: <webview>: Implement ExecuteScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated stale browser_plugin_messages.h Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 861
862 bool ChromeContentBrowserClient::ShouldSwapProcessesForRedirect( 862 bool ChromeContentBrowserClient::ShouldSwapProcessesForRedirect(
863 content::ResourceContext* resource_context, const GURL& current_url, 863 content::ResourceContext* resource_context, const GURL& current_url,
864 const GURL& new_url) { 864 const GURL& new_url) {
865 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); 865 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
866 return extensions::CrossesExtensionProcessBoundary( 866 return extensions::CrossesExtensionProcessBoundary(
867 io_data->GetExtensionInfoMap()->extensions(), 867 io_data->GetExtensionInfoMap()->extensions(),
868 ExtensionURLInfo(current_url), ExtensionURLInfo(new_url), false); 868 ExtensionURLInfo(current_url), ExtensionURLInfo(new_url), false);
869 } 869 }
870 870
871 void ChromeContentBrowserClient::GuestWebContentsCreated(
872 WebContents* guest_web_contents, WebContents* embedder_web_contents) {
873 Profile* profile = Profile::FromBrowserContext(
874 embedder_web_contents->GetBrowserContext());
875 ExtensionService* service =
876 extensions::ExtensionSystem::Get(profile)->extension_service();
877 if (!service)
878 return;
879 const GURL& url = embedder_web_contents->GetSiteInstance()->GetSiteURL();
880 const Extension* extension = service->extensions()->
881 GetExtensionOrAppByURL(ExtensionURLInfo(url));
882 if (!extension)
883 return;
884 std::vector<ExtensionMsg_Loaded_Params> extensions;
885 extensions.push_back(ExtensionMsg_Loaded_Params(extension));
886 guest_web_contents->Send(new ExtensionMsg_Loaded(extensions));
887 }
888
871 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 889 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
872 const std::string& alias_name) { 890 const std::string& alias_name) {
873 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 891 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
874 } 892 }
875 893
876 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 894 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
877 CommandLine* command_line, int child_process_id) { 895 CommandLine* command_line, int child_process_id) {
878 #if defined(USE_LINUX_BREAKPAD) 896 #if defined(USE_LINUX_BREAKPAD)
879 if (IsCrashReporterEnabled()) { 897 if (IsCrashReporterEnabled()) {
880 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 898 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 io_thread_application_locale_ = locale; 1920 io_thread_application_locale_ = locale;
1903 } 1921 }
1904 1922
1905 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1923 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1906 const std::string& locale) { 1924 const std::string& locale) {
1907 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1925 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1908 io_thread_application_locale_ = locale; 1926 io_thread_application_locale_ = locale;
1909 } 1927 }
1910 1928
1911 } // namespace chrome 1929 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698