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/guest_view/extension_options/extension_options_gues
t.h" | 5 #include "extensions/browser/guest_view/extension_options/extension_options_gues
t.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "components/crx_file/id_util.h" | 8 #include "components/crx_file/id_util.h" |
9 #include "components/guest_view/browser/guest_view_event.h" | 9 #include "components/guest_view/browser/guest_view_event.h" |
10 #include "components/guest_view/browser/guest_view_manager.h" | 10 #include "components/guest_view/browser/guest_view_manager.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 bool ExtensionOptionsGuest::HandleContextMenu( | 183 bool ExtensionOptionsGuest::HandleContextMenu( |
184 const content::ContextMenuParams& params) { | 184 const content::ContextMenuParams& params) { |
185 if (!extension_options_guest_delegate_) | 185 if (!extension_options_guest_delegate_) |
186 return false; | 186 return false; |
187 | 187 |
188 return extension_options_guest_delegate_->HandleContextMenu(params); | 188 return extension_options_guest_delegate_->HandleContextMenu(params); |
189 } | 189 } |
190 | 190 |
191 bool ExtensionOptionsGuest::ShouldCreateWebContents( | 191 bool ExtensionOptionsGuest::ShouldCreateWebContents( |
192 WebContents* web_contents, | 192 WebContents* web_contents, |
193 int route_id, | 193 int32_t route_id, |
194 int main_frame_route_id, | 194 int32_t main_frame_route_id, |
| 195 int32_t main_frame_widget_route_id, |
195 WindowContainerType window_container_type, | 196 WindowContainerType window_container_type, |
196 const std::string& frame_name, | 197 const std::string& frame_name, |
197 const GURL& target_url, | 198 const GURL& target_url, |
198 const std::string& partition_id, | 199 const std::string& partition_id, |
199 content::SessionStorageNamespace* session_storage_namespace) { | 200 content::SessionStorageNamespace* session_storage_namespace) { |
200 // This method handles opening links from within the guest. Since this guest | 201 // This method handles opening links from within the guest. Since this guest |
201 // view is used for displaying embedded extension options, we want any | 202 // view is used for displaying embedded extension options, we want any |
202 // external links to be opened in a new tab, not in a new guest view. | 203 // external links to be opened in a new tab, not in a new guest view. |
203 // Therefore we just open the URL in a new tab, and since we aren't handling | 204 // Therefore we just open the URL in a new tab, and since we aren't handling |
204 // the new web contents, we return false. | 205 // the new web contents, we return false. |
(...skipping 21 matching lines...) Expand all Loading... |
226 SetGuestZoomLevelToMatchEmbedder(); | 227 SetGuestZoomLevelToMatchEmbedder(); |
227 | 228 |
228 if (params.url.GetOrigin() != options_page_.GetOrigin()) { | 229 if (params.url.GetOrigin() != options_page_.GetOrigin()) { |
229 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), | 230 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), |
230 bad_message::EOG_BAD_ORIGIN); | 231 bad_message::EOG_BAD_ORIGIN); |
231 } | 232 } |
232 } | 233 } |
233 } | 234 } |
234 | 235 |
235 } // namespace extensions | 236 } // namespace extensions |
OLD | NEW |