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

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: Renamed misnamed variable 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 860
861 bool ChromeContentBrowserClient::ShouldSwapProcessesForRedirect( 861 bool ChromeContentBrowserClient::ShouldSwapProcessesForRedirect(
862 content::ResourceContext* resource_context, const GURL& current_url, 862 content::ResourceContext* resource_context, const GURL& current_url,
863 const GURL& new_url) { 863 const GURL& new_url) {
864 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); 864 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
865 return extensions::CrossesExtensionProcessBoundary( 865 return extensions::CrossesExtensionProcessBoundary(
866 io_data->GetExtensionInfoMap()->extensions(), 866 io_data->GetExtensionInfoMap()->extensions(),
867 ExtensionURLInfo(current_url), ExtensionURLInfo(new_url), false); 867 ExtensionURLInfo(current_url), ExtensionURLInfo(new_url), false);
868 } 868 }
869 869
870 void ChromeContentBrowserClient::GuestWebContentsCreated(
871 WebContents* guest_web_contents, WebContents* embedder_web_contents) {
872 Profile* profile = Profile::FromBrowserContext(
873 embedder_web_contents->GetBrowserContext());
874 ExtensionService* service =
875 extensions::ExtensionSystem::Get(profile)->extension_service();
876 if (!service)
877 return;
878 const GURL& url = embedder_web_contents->GetSiteInstance()->GetSiteURL();
879 const Extension* extension = service->extensions()->GetByID(url.host());
Matt Perry 2013/01/23 02:50:49 Use GetExtensionOrAppByURL - the URL here is not n
Fady Samuel 2013/01/23 20:12:03 Done.
880 if (!extension)
881 return;
882 std::vector<ExtensionMsg_Loaded_Params> extensions;
883 extensions.push_back(ExtensionMsg_Loaded_Params(extension));
884 guest_web_contents->Send(new ExtensionMsg_Loaded(extensions));
Matt Perry 2013/01/23 02:50:49 Normally this is sent by ChromeRenderViewHostObser
Fady Samuel 2013/01/23 20:12:03 ChromeRenderViewHostObserver::GetExtension() retur
885 }
886
870 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 887 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
871 const std::string& alias_name) { 888 const std::string& alias_name) {
872 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 889 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
873 } 890 }
874 891
875 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 892 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
876 CommandLine* command_line, int child_process_id) { 893 CommandLine* command_line, int child_process_id) {
877 #if defined(USE_LINUX_BREAKPAD) 894 #if defined(USE_LINUX_BREAKPAD)
878 if (IsCrashReporterEnabled()) { 895 if (IsCrashReporterEnabled()) {
879 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 896 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 io_thread_application_locale_ = locale; 1912 io_thread_application_locale_ = locale;
1896 } 1913 }
1897 1914
1898 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1915 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1899 const std::string& locale) { 1916 const std::string& locale) {
1900 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1917 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1901 io_thread_application_locale_ = locale; 1918 io_thread_application_locale_ = locale;
1902 } 1919 }
1903 1920
1904 } // namespace chrome 1921 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698