| OLD | NEW |
| 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 "chrome/browser/extensions/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" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "extensions/browser/event_router.h" | 40 #include "extensions/browser/event_router.h" |
| 41 #include "extensions/browser/extension_error.h" | 41 #include "extensions/browser/extension_error.h" |
| 42 #include "extensions/browser/extensions_browser_client.h" | 42 #include "extensions/browser/extensions_browser_client.h" |
| 43 #include "extensions/browser/process_manager.h" | 43 #include "extensions/browser/process_manager.h" |
| 44 #include "extensions/browser/runtime_data.h" | 44 #include "extensions/browser/runtime_data.h" |
| 45 #include "extensions/browser/view_type_utils.h" | 45 #include "extensions/browser/view_type_utils.h" |
| 46 #include "extensions/common/extension.h" | 46 #include "extensions/common/extension.h" |
| 47 #include "extensions/common/extension_urls.h" | 47 #include "extensions/common/extension_urls.h" |
| 48 #include "extensions/common/feature_switch.h" | 48 #include "extensions/common/feature_switch.h" |
| 49 #include "extensions/common/manifest_handlers/background_info.h" | 49 #include "extensions/common/manifest_handlers/background_info.h" |
| 50 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 50 #include "ui/base/l10n/l10n_util.h" | 51 #include "ui/base/l10n/l10n_util.h" |
| 51 #include "ui/base/window_open_disposition.h" | 52 #include "ui/base/window_open_disposition.h" |
| 52 | 53 |
| 53 using content::BrowserContext; | 54 using content::BrowserContext; |
| 54 using content::OpenURLParams; | 55 using content::OpenURLParams; |
| 55 using content::RenderProcessHost; | 56 using content::RenderProcessHost; |
| 56 using content::RenderViewHost; | 57 using content::RenderViewHost; |
| 57 using content::SiteInstance; | 58 using content::SiteInstance; |
| 58 using content::WebContents; | 59 using content::WebContents; |
| 59 | 60 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 } | 471 } |
| 471 | 472 |
| 472 void ExtensionHost::RequestMediaAccessPermission( | 473 void ExtensionHost::RequestMediaAccessPermission( |
| 473 content::WebContents* web_contents, | 474 content::WebContents* web_contents, |
| 474 const content::MediaStreamRequest& request, | 475 const content::MediaStreamRequest& request, |
| 475 const content::MediaResponseCallback& callback) { | 476 const content::MediaResponseCallback& callback) { |
| 476 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 477 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
| 477 web_contents, request, callback, extension()); | 478 web_contents, request, callback, extension()); |
| 478 } | 479 } |
| 479 | 480 |
| 481 bool ExtensionHost::PreHandleGestureEvent( |
| 482 content::WebContents* source, |
| 483 const blink::WebGestureEvent& event) { |
| 484 // Disable pinch zooming. |
| 485 return event.type == blink::WebGestureEvent::GesturePinchBegin || |
| 486 event.type == blink::WebGestureEvent::GesturePinchUpdate || |
| 487 event.type == blink::WebGestureEvent::GesturePinchEnd; |
| 488 } |
| 489 |
| 480 } // namespace extensions | 490 } // namespace extensions |
| OLD | NEW |