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

Side by Side Diff: chrome/browser/extensions/chrome_extension_host_delegate.cc

Issue 376813002: Android: Remove more unneeded bits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/chrome_extension_host_delegate.h" 5 #include "chrome/browser/extensions/chrome_extension_host_delegate.h"
6 6
7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
8 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_tab_util.h" 8 #include "chrome/browser/extensions/extension_tab_util.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 9 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
11 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h" 10 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h"
12 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 11 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
13 #include "extensions/browser/extension_host.h" 12 #include "extensions/browser/extension_host.h"
14 #include "extensions/browser/extension_system.h" 13 #include "extensions/browser/extension_system.h"
15 14
15 // TODO(thestig): Remove #ifdefs when extensions is disabled on mobile.
16 #if defined(ENABLE_EXTENSIONS)
17 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
18 #endif
19
16 namespace extensions { 20 namespace extensions {
17 21
18 ChromeExtensionHostDelegate::ChromeExtensionHostDelegate() {} 22 ChromeExtensionHostDelegate::ChromeExtensionHostDelegate() {}
19 23
20 ChromeExtensionHostDelegate::~ChromeExtensionHostDelegate() {} 24 ChromeExtensionHostDelegate::~ChromeExtensionHostDelegate() {}
21 25
22 void ChromeExtensionHostDelegate::OnExtensionHostCreated( 26 void ChromeExtensionHostDelegate::OnExtensionHostCreated(
23 content::WebContents* web_contents) { 27 content::WebContents* web_contents) {
28 #if defined(ENABLE_EXTENSIONS)
24 ChromeExtensionWebContentsObserver::CreateForWebContents(web_contents); 29 ChromeExtensionWebContentsObserver::CreateForWebContents(web_contents);
not at google - send to devlin 2014/07/08 15:18:14 there is going to be a lot of this. would it make
Lei Zhang 2014/07/08 20:41:13 There are many, but a good percentage of them are
30 #endif
25 PrefsTabHelper::CreateForWebContents(web_contents); 31 PrefsTabHelper::CreateForWebContents(web_contents);
26 } 32 }
27 33
28 void ChromeExtensionHostDelegate::OnRenderViewCreatedForBackgroundPage( 34 void ChromeExtensionHostDelegate::OnRenderViewCreatedForBackgroundPage(
29 ExtensionHost* host) { 35 ExtensionHost* host) {
30 ExtensionService* service = 36 ExtensionService* service =
31 ExtensionSystem::Get(host->browser_context())->extension_service(); 37 ExtensionSystem::Get(host->browser_context())->extension_service();
32 if (service) 38 if (service)
33 service->DidCreateRenderViewForBackgroundPage(host); 39 service->DidCreateRenderViewForBackgroundPage(host);
34 } 40 }
(...skipping 15 matching lines...) Expand all
50 void ChromeExtensionHostDelegate::ProcessMediaAccessRequest( 56 void ChromeExtensionHostDelegate::ProcessMediaAccessRequest(
51 content::WebContents* web_contents, 57 content::WebContents* web_contents,
52 const content::MediaStreamRequest& request, 58 const content::MediaStreamRequest& request,
53 const content::MediaResponseCallback& callback, 59 const content::MediaResponseCallback& callback,
54 const Extension* extension) { 60 const Extension* extension) {
55 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( 61 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
56 web_contents, request, callback, extension); 62 web_contents, request, callback, extension);
57 } 63 }
58 64
59 } // namespace extensions 65 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698