| 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 "chrome/browser/guest_view/web_view/web_view_guest.h" | 5 #include "chrome/browser/guest_view/web_view/web_view_guest.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 10 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 122 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 123 contents); | 123 contents); |
| 124 #if defined(ENABLE_PLUGINS) | 124 #if defined(ENABLE_PLUGINS) |
| 125 PluginPermissionHelper::CreateForWebContents(contents); | 125 PluginPermissionHelper::CreateForWebContents(contents); |
| 126 #endif | 126 #endif |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace | 129 } // namespace |
| 130 | 130 |
| 131 WebViewGuest::WebViewGuest(WebContents* guest_web_contents, | 131 WebViewGuest::WebViewGuest(WebContents* guest_web_contents, |
| 132 const std::string& extension_id) | 132 const std::string& embedder_extension_id, |
| 133 : GuestView<WebViewGuest>(guest_web_contents, extension_id), | 133 const base::WeakPtr<GuestViewBase>& opener) |
| 134 : GuestView<WebViewGuest>(guest_web_contents, |
| 135 embedder_extension_id, |
| 136 opener), |
| 134 WebContentsObserver(guest_web_contents), | 137 WebContentsObserver(guest_web_contents), |
| 135 script_executor_(new extensions::ScriptExecutor(guest_web_contents, | 138 script_executor_(new extensions::ScriptExecutor(guest_web_contents, |
| 136 &script_observers_)), | 139 &script_observers_)), |
| 137 next_permission_request_id_(0), | 140 next_permission_request_id_(0), |
| 138 is_overriding_user_agent_(false), | 141 is_overriding_user_agent_(false), |
| 139 pending_reload_on_attachment_(false), | 142 pending_reload_on_attachment_(false), |
| 140 main_frame_id_(0), | 143 main_frame_id_(0), |
| 141 chromevox_injected_(false), | 144 chromevox_injected_(false), |
| 142 find_helper_(this), | 145 find_helper_(this), |
| 143 javascript_dialog_helper_(this) { | 146 javascript_dialog_helper_(this) { |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 const PermissionResponseCallback& callback, | 1017 const PermissionResponseCallback& callback, |
| 1015 BrowserPluginPermissionType permission_type, | 1018 BrowserPluginPermissionType permission_type, |
| 1016 bool allowed_by_default) | 1019 bool allowed_by_default) |
| 1017 : callback(callback), | 1020 : callback(callback), |
| 1018 permission_type(permission_type), | 1021 permission_type(permission_type), |
| 1019 allowed_by_default(allowed_by_default) { | 1022 allowed_by_default(allowed_by_default) { |
| 1020 } | 1023 } |
| 1021 | 1024 |
| 1022 WebViewGuest::PermissionResponseInfo::~PermissionResponseInfo() { | 1025 WebViewGuest::PermissionResponseInfo::~PermissionResponseInfo() { |
| 1023 } | 1026 } |
| OLD | NEW |