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/guestview/webview/webview_guest.h" | 5 #include "chrome/browser/guestview/webview/webview_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& extension_id, |
133 : GuestView(guest_web_contents, extension_id), | 133 const base::WeakPtr<GuestView>& opener) |
| 134 : GuestView(guest_web_contents, extension_id, opener), |
134 WebContentsObserver(guest_web_contents), | 135 WebContentsObserver(guest_web_contents), |
135 script_executor_(new extensions::ScriptExecutor(guest_web_contents, | 136 script_executor_(new extensions::ScriptExecutor(guest_web_contents, |
136 &script_observers_)), | 137 &script_observers_)), |
137 next_permission_request_id_(0), | 138 next_permission_request_id_(0), |
138 is_overriding_user_agent_(false), | 139 is_overriding_user_agent_(false), |
139 pending_reload_on_attachment_(false), | 140 pending_reload_on_attachment_(false), |
140 main_frame_id_(0), | 141 main_frame_id_(0), |
141 chromevox_injected_(false), | 142 chromevox_injected_(false), |
142 find_helper_(this), | 143 find_helper_(this), |
143 javascript_dialog_helper_(this) { | 144 javascript_dialog_helper_(this) { |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 const PermissionResponseCallback& callback, | 1030 const PermissionResponseCallback& callback, |
1030 BrowserPluginPermissionType permission_type, | 1031 BrowserPluginPermissionType permission_type, |
1031 bool allowed_by_default) | 1032 bool allowed_by_default) |
1032 : callback(callback), | 1033 : callback(callback), |
1033 permission_type(permission_type), | 1034 permission_type(permission_type), |
1034 allowed_by_default(allowed_by_default) { | 1035 allowed_by_default(allowed_by_default) { |
1035 } | 1036 } |
1036 | 1037 |
1037 WebViewGuest::PermissionResponseInfo::~PermissionResponseInfo() { | 1038 WebViewGuest::PermissionResponseInfo::~PermissionResponseInfo() { |
1038 } | 1039 } |
OLD | NEW |