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