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

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

Issue 12189018: <webview>: Implement WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 7 years, 7 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "chrome/browser/ssl/ssl_tab_helper.h" 75 #include "chrome/browser/ssl/ssl_tab_helper.h"
76 #include "chrome/browser/tab_contents/tab_util.h" 76 #include "chrome/browser/tab_contents/tab_util.h"
77 #include "chrome/browser/toolkit_extra_parts.h" 77 #include "chrome/browser/toolkit_extra_parts.h"
78 #include "chrome/browser/ui/chrome_select_file_policy.h" 78 #include "chrome/browser/ui/chrome_select_file_policy.h"
79 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 79 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
80 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 80 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
81 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" 81 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
82 #include "chrome/browser/user_style_sheet_watcher.h" 82 #include "chrome/browser/user_style_sheet_watcher.h"
83 #include "chrome/browser/user_style_sheet_watcher_factory.h" 83 #include "chrome/browser/user_style_sheet_watcher_factory.h"
84 #include "chrome/browser/validation_message_message_filter.h" 84 #include "chrome/browser/validation_message_message_filter.h"
85 #include "chrome/browser/webview/webview_guest.h"
85 #include "chrome/common/child_process_logging.h" 86 #include "chrome/common/child_process_logging.h"
86 #include "chrome/common/chrome_constants.h" 87 #include "chrome/common/chrome_constants.h"
87 #include "chrome/common/chrome_paths.h" 88 #include "chrome/common/chrome_paths.h"
88 #include "chrome/common/chrome_process_type.h" 89 #include "chrome/common/chrome_process_type.h"
89 #include "chrome/common/chrome_switches.h" 90 #include "chrome/common/chrome_switches.h"
90 #include "chrome/common/extensions/background_info.h" 91 #include "chrome/common/extensions/background_info.h"
91 #include "chrome/common/extensions/extension.h" 92 #include "chrome/common/extensions/extension.h"
92 #include "chrome/common/extensions/extension_process_policy.h" 93 #include "chrome/common/extensions/extension_process_policy.h"
93 #include "chrome/common/extensions/extension_set.h" 94 #include "chrome/common/extensions/extension_set.h"
94 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" 95 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 const Extension* extension = service->extensions()-> 686 const Extension* extension = service->extensions()->
686 GetExtensionOrAppByURL(ExtensionURLInfo(url)); 687 GetExtensionOrAppByURL(ExtensionURLInfo(url));
687 if (!extension) 688 if (!extension)
688 return; 689 return;
689 std::vector<ExtensionMsg_Loaded_Params> extensions; 690 std::vector<ExtensionMsg_Loaded_Params> extensions;
690 extensions.push_back(ExtensionMsg_Loaded_Params(extension)); 691 extensions.push_back(ExtensionMsg_Loaded_Params(extension));
691 guest_web_contents->Send(new ExtensionMsg_Loaded(extensions)); 692 guest_web_contents->Send(new ExtensionMsg_Loaded(extensions));
692 // TODO(fsamuel): This should be replaced with WebViewGuest or AdViewGuest 693 // TODO(fsamuel): This should be replaced with WebViewGuest or AdViewGuest
693 // once they are ready. 694 // once they are ready.
694 extensions::TabHelper::CreateForWebContents(guest_web_contents); 695 extensions::TabHelper::CreateForWebContents(guest_web_contents);
696 new WebViewGuest(guest_web_contents, embedder_web_contents, extension->id());
695 } 697 }
696 698
697 void ChromeContentBrowserClient::RenderProcessHostCreated( 699 void ChromeContentBrowserClient::RenderProcessHostCreated(
698 content::RenderProcessHost* host) { 700 content::RenderProcessHost* host) {
699 int id = host->GetID(); 701 int id = host->GetID();
700 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 702 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
701 net::URLRequestContextGetter* context = 703 net::URLRequestContextGetter* context =
702 profile->GetRequestContextForRenderProcess(id); 704 profile->GetRequestContextForRenderProcess(id);
703 705
704 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter( 706 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter(
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 #if defined(USE_NSS) 2317 #if defined(USE_NSS)
2316 crypto::CryptoModuleBlockingPasswordDelegate* 2318 crypto::CryptoModuleBlockingPasswordDelegate*
2317 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 2319 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
2318 const GURL& url) { 2320 const GURL& url) {
2319 return chrome::NewCryptoModuleBlockingDialogDelegate( 2321 return chrome::NewCryptoModuleBlockingDialogDelegate(
2320 chrome::kCryptoModulePasswordKeygen, url.host()); 2322 chrome::kCryptoModulePasswordKeygen, url.host());
2321 } 2323 }
2322 #endif 2324 #endif
2323 2325
2324 } // namespace chrome 2326 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_api.h » ('j') | chrome/browser/webview/webview_guest.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698