| OLD | NEW |
| 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 "extensions/browser/app_window/app_web_contents_helper.h" | 5 #include "extensions/browser/app_window/app_web_contents_helper.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "content/public/browser/native_web_keyboard_event.h" | 8 #include "content/public/browser/native_web_keyboard_event.h" |
| 9 #include "content/public/browser/page_navigator.h" | 9 #include "content/public/browser/page_navigator.h" |
| 10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 #include "content/public/common/console_message_level.h" | 12 #include "content/public/common/console_message_level.h" |
| 13 #include "extensions/browser/app_window/app_delegate.h" | 13 #include "extensions/browser/app_window/app_delegate.h" |
| 14 #include "extensions/browser/extension_registry.h" | 14 #include "extensions/browser/extension_registry.h" |
| 15 #include "extensions/browser/suggest_permission_util.h" | 15 #include "extensions/browser/suggest_permission_util.h" |
| 16 #include "extensions/common/permissions/api_permission.h" | 16 #include "extensions/common/permissions/api_permission.h" |
| 17 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
| 17 | 18 |
| 18 namespace extensions { | 19 namespace extensions { |
| 19 | 20 |
| 20 AppWebContentsHelper::AppWebContentsHelper( | 21 AppWebContentsHelper::AppWebContentsHelper( |
| 21 content::BrowserContext* browser_context, | 22 content::BrowserContext* browser_context, |
| 22 const std::string& extension_id, | 23 const std::string& extension_id, |
| 23 content::WebContents* web_contents, | 24 content::WebContents* web_contents, |
| 24 AppDelegate* app_delegate) | 25 AppDelegate* app_delegate) |
| 25 : browser_context_(browser_context), | 26 : browser_context_(browser_context), |
| 26 extension_id_(extension_id), | 27 extension_id_(extension_id), |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 web_contents_, security_origin, type, extension); | 106 web_contents_, security_origin, type, extension); |
| 106 } | 107 } |
| 107 | 108 |
| 108 const Extension* AppWebContentsHelper::GetExtension() const { | 109 const Extension* AppWebContentsHelper::GetExtension() const { |
| 109 return ExtensionRegistry::Get(browser_context_) | 110 return ExtensionRegistry::Get(browser_context_) |
| 110 ->enabled_extensions() | 111 ->enabled_extensions() |
| 111 .GetByID(extension_id_); | 112 .GetByID(extension_id_); |
| 112 } | 113 } |
| 113 | 114 |
| 114 } // namespace extensions | 115 } // namespace extensions |
| OLD | NEW |