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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "components/crx_file/id_util.h" | 10 #include "components/crx_file/id_util.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 void ExtensionOptionsGuest::DidNavigateMainFrame( | 224 void ExtensionOptionsGuest::DidNavigateMainFrame( |
225 const content::LoadCommittedDetails& details, | 225 const content::LoadCommittedDetails& details, |
226 const content::FrameNavigateParams& params) { | 226 const content::FrameNavigateParams& params) { |
227 if (attached()) { | 227 if (attached()) { |
228 auto guest_zoom_controller = | 228 auto guest_zoom_controller = |
229 ui_zoom::ZoomController::FromWebContents(web_contents()); | 229 ui_zoom::ZoomController::FromWebContents(web_contents()); |
230 guest_zoom_controller->SetZoomMode( | 230 guest_zoom_controller->SetZoomMode( |
231 ui_zoom::ZoomController::ZOOM_MODE_ISOLATED); | 231 ui_zoom::ZoomController::ZOOM_MODE_ISOLATED); |
232 SetGuestZoomLevelToMatchEmbedder(); | 232 SetGuestZoomLevelToMatchEmbedder(); |
233 | 233 |
234 if (params.url.GetOrigin() != options_page_.GetOrigin()) { | 234 if (!url::IsSameOriginWith(params.url, options_page_)) { |
235 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), | 235 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), |
236 bad_message::EOG_BAD_ORIGIN); | 236 bad_message::EOG_BAD_ORIGIN); |
237 } | 237 } |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 } // namespace extensions | 241 } // namespace extensions |
OLD | NEW |