| 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 "components/guest_view/browser/guest_view_base.h" | 5 #include "components/guest_view/browser/guest_view_base.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } | 361 } |
| 362 | 362 |
| 363 bool GuestViewBase::IsPreferredSizeModeEnabled() const { | 363 bool GuestViewBase::IsPreferredSizeModeEnabled() const { |
| 364 return false; | 364 return false; |
| 365 } | 365 } |
| 366 | 366 |
| 367 bool GuestViewBase::ZoomPropagatesFromEmbedderToGuest() const { | 367 bool GuestViewBase::ZoomPropagatesFromEmbedderToGuest() const { |
| 368 return true; | 368 return true; |
| 369 } | 369 } |
| 370 | 370 |
| 371 void GuestViewBase::SetContextMenuPosition(const gfx::Point& position) {} |
| 372 |
| 371 WebContents* GuestViewBase::CreateNewGuestWindow( | 373 WebContents* GuestViewBase::CreateNewGuestWindow( |
| 372 const WebContents::CreateParams& create_params) { | 374 const WebContents::CreateParams& create_params) { |
| 373 auto guest_manager = GuestViewManager::FromBrowserContext(browser_context()); | 375 auto guest_manager = GuestViewManager::FromBrowserContext(browser_context()); |
| 374 return guest_manager->CreateGuestWithWebContentsParams( | 376 return guest_manager->CreateGuestWithWebContentsParams( |
| 375 GetViewType(), | 377 GetViewType(), |
| 376 owner_web_contents(), | 378 owner_web_contents(), |
| 377 create_params); | 379 create_params); |
| 378 } | 380 } |
| 379 | 381 |
| 380 void GuestViewBase::DidAttach(int guest_proxy_routing_id) { | 382 void GuestViewBase::DidAttach(int guest_proxy_routing_id) { |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 | 863 |
| 862 auto embedder_zoom_controller = | 864 auto embedder_zoom_controller = |
| 863 ui_zoom::ZoomController::FromWebContents(owner_web_contents()); | 865 ui_zoom::ZoomController::FromWebContents(owner_web_contents()); |
| 864 // Chrome Apps do not have a ZoomController. | 866 // Chrome Apps do not have a ZoomController. |
| 865 if (!embedder_zoom_controller) | 867 if (!embedder_zoom_controller) |
| 866 return; | 868 return; |
| 867 embedder_zoom_controller->RemoveObserver(this); | 869 embedder_zoom_controller->RemoveObserver(this); |
| 868 } | 870 } |
| 869 | 871 |
| 870 } // namespace guest_view | 872 } // namespace guest_view |
| OLD | NEW |