| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 363 } |
| 364 | 364 |
| 365 bool GuestViewBase::IsPreferredSizeModeEnabled() const { | 365 bool GuestViewBase::IsPreferredSizeModeEnabled() const { |
| 366 return false; | 366 return false; |
| 367 } | 367 } |
| 368 | 368 |
| 369 bool GuestViewBase::ZoomPropagatesFromEmbedderToGuest() const { | 369 bool GuestViewBase::ZoomPropagatesFromEmbedderToGuest() const { |
| 370 return true; | 370 return true; |
| 371 } | 371 } |
| 372 | 372 |
| 373 void GuestViewBase::SetContextMenuPosition(const gfx::Point& position) {} |
| 374 |
| 373 content::WebContents* GuestViewBase::CreateNewGuestWindow( | 375 content::WebContents* GuestViewBase::CreateNewGuestWindow( |
| 374 const content::WebContents::CreateParams& create_params) { | 376 const content::WebContents::CreateParams& create_params) { |
| 375 auto guest_manager = GuestViewManager::FromBrowserContext(browser_context()); | 377 auto guest_manager = GuestViewManager::FromBrowserContext(browser_context()); |
| 376 return guest_manager->CreateGuestWithWebContentsParams( | 378 return guest_manager->CreateGuestWithWebContentsParams( |
| 377 GetViewType(), | 379 GetViewType(), |
| 378 owner_web_contents(), | 380 owner_web_contents(), |
| 379 create_params); | 381 create_params); |
| 380 } | 382 } |
| 381 | 383 |
| 382 void GuestViewBase::DidAttach(int guest_proxy_routing_id) { | 384 void GuestViewBase::DidAttach(int guest_proxy_routing_id) { |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 | 850 |
| 849 auto embedder_zoom_controller = | 851 auto embedder_zoom_controller = |
| 850 ui_zoom::ZoomController::FromWebContents(owner_web_contents()); | 852 ui_zoom::ZoomController::FromWebContents(owner_web_contents()); |
| 851 // Chrome Apps do not have a ZoomController. | 853 // Chrome Apps do not have a ZoomController. |
| 852 if (!embedder_zoom_controller) | 854 if (!embedder_zoom_controller) |
| 853 return; | 855 return; |
| 854 embedder_zoom_controller->RemoveObserver(this); | 856 embedder_zoom_controller->RemoveObserver(this); |
| 855 } | 857 } |
| 856 | 858 |
| 857 } // namespace guest_view | 859 } // namespace guest_view |
| OLD | NEW |