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

Side by Side Diff: extensions/browser/extension_host.cc

Issue 198703006: Move ExtensionHost from src/chrome to src/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/lazy_background_task_queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/extension_host.h" 5 #include "extensions/browser/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
18 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
19 #include "content/public/browser/browser_context.h" 18 #include "content/public/browser/browser_context.h"
20 #include "content/public/browser/content_browser_client.h" 19 #include "content/public/browser/content_browser_client.h"
21 #include "content/public/browser/native_web_keyboard_event.h" 20 #include "content/public/browser/native_web_keyboard_event.h"
22 #include "content/public/browser/notification_service.h" 21 #include "content/public/browser/notification_service.h"
23 #include "content/public/browser/notification_source.h" 22 #include "content/public/browser/notification_source.h"
24 #include "content/public/browser/notification_types.h" 23 #include "content/public/browser/notification_types.h"
25 #include "content/public/browser/render_process_host.h" 24 #include "content/public/browser/render_process_host.h"
26 #include "content/public/browser/render_view_host.h" 25 #include "content/public/browser/render_view_host.h"
27 #include "content/public/browser/render_widget_host_view.h" 26 #include "content/public/browser/render_widget_host_view.h"
28 #include "content/public/browser/site_instance.h" 27 #include "content/public/browser/site_instance.h"
29 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
30 #include "extensions/browser/event_router.h" 29 #include "extensions/browser/event_router.h"
31 #include "extensions/browser/extension_error.h" 30 #include "extensions/browser/extension_error.h"
32 #include "extensions/browser/extension_host_delegate.h" 31 #include "extensions/browser/extension_host_delegate.h"
33 #include "extensions/browser/extension_system.h" 32 #include "extensions/browser/extension_system.h"
34 #include "extensions/browser/extensions_browser_client.h" 33 #include "extensions/browser/extensions_browser_client.h"
35 #include "extensions/browser/process_manager.h" 34 #include "extensions/browser/process_manager.h"
36 #include "extensions/browser/runtime_data.h" 35 #include "extensions/browser/runtime_data.h"
37 #include "extensions/browser/view_type_utils.h" 36 #include "extensions/browser/view_type_utils.h"
38 #include "extensions/common/extension.h" 37 #include "extensions/common/extension.h"
39 #include "extensions/common/extension_messages.h" 38 #include "extensions/common/extension_messages.h"
40 #include "extensions/common/extension_urls.h" 39 #include "extensions/common/extension_urls.h"
41 #include "extensions/common/feature_switch.h" 40 #include "extensions/common/feature_switch.h"
42 #include "extensions/common/manifest_handlers/background_info.h" 41 #include "extensions/common/manifest_handlers/background_info.h"
43 #include "third_party/WebKit/public/web/WebInputEvent.h"
44 #include "ui/base/l10n/l10n_util.h" 42 #include "ui/base/l10n/l10n_util.h"
45 #include "ui/base/window_open_disposition.h" 43 #include "ui/base/window_open_disposition.h"
46 44
47 using content::BrowserContext; 45 using content::BrowserContext;
48 using content::OpenURLParams; 46 using content::OpenURLParams;
49 using content::RenderProcessHost; 47 using content::RenderProcessHost;
50 using content::RenderViewHost; 48 using content::RenderViewHost;
51 using content::SiteInstance; 49 using content::SiteInstance;
52 using content::WebContents; 50 using content::WebContents;
53 51
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 420 }
423 421
424 void ExtensionHost::RequestMediaAccessPermission( 422 void ExtensionHost::RequestMediaAccessPermission(
425 content::WebContents* web_contents, 423 content::WebContents* web_contents,
426 const content::MediaStreamRequest& request, 424 const content::MediaStreamRequest& request,
427 const content::MediaResponseCallback& callback) { 425 const content::MediaResponseCallback& callback) {
428 delegate_->ProcessMediaAccessRequest( 426 delegate_->ProcessMediaAccessRequest(
429 web_contents, request, callback, extension()); 427 web_contents, request, callback, extension());
430 } 428 }
431 429
432 bool ExtensionHost::PreHandleGestureEvent(
433 content::WebContents* source,
434 const blink::WebGestureEvent& event) {
435 // Disable pinch zooming.
436 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
437 event.type == blink::WebGestureEvent::GesturePinchUpdate ||
438 event.type == blink::WebGestureEvent::GesturePinchEnd;
439 }
440
441 } // namespace extensions 430 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/lazy_background_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698