| 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/web_view/web_view_guest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 double WebViewGuest::GetZoom() const { | 544 double WebViewGuest::GetZoom() const { |
| 545 double zoom_level = | 545 double zoom_level = |
| 546 ZoomController::FromWebContents(web_contents())->GetZoomLevel(); | 546 ZoomController::FromWebContents(web_contents())->GetZoomLevel(); |
| 547 return ConvertZoomLevelToZoomFactor(zoom_level); | 547 return ConvertZoomLevelToZoomFactor(zoom_level); |
| 548 } | 548 } |
| 549 | 549 |
| 550 ZoomController::ZoomMode WebViewGuest::GetZoomMode() { | 550 ZoomController::ZoomMode WebViewGuest::GetZoomMode() { |
| 551 return ZoomController::FromWebContents(web_contents())->zoom_mode(); | 551 return ZoomController::FromWebContents(web_contents())->zoom_mode(); |
| 552 } | 552 } |
| 553 | 553 |
| 554 bool WebViewGuest::HandleContextMenu( | 554 bool WebViewGuest::HandleContextMenu(RenderFrameHost* render_frame_host, |
| 555 const content::ContextMenuParams& params) { | 555 const content::ContextMenuParams& params) { |
| 556 if (!web_view_guest_delegate_) | 556 if (!web_view_guest_delegate_) |
| 557 return false; | 557 return false; |
| 558 return web_view_guest_delegate_->HandleContextMenu(params); | 558 return web_view_guest_delegate_->HandleContextMenu(params); |
| 559 } | 559 } |
| 560 | 560 |
| 561 void WebViewGuest::HandleKeyboardEvent( | 561 void WebViewGuest::HandleKeyboardEvent( |
| 562 WebContents* source, | 562 WebContents* source, |
| 563 const content::NativeWebKeyboardEvent& event) { | 563 const content::NativeWebKeyboardEvent& event) { |
| 564 if (HandleKeyboardShortcuts(event)) | 564 if (HandleKeyboardShortcuts(event)) |
| 565 return; | 565 return; |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 std::unique_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1497 std::unique_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 1498 DispatchEventToView(base::WrapUnique( | 1498 DispatchEventToView(base::WrapUnique( |
| 1499 new GuestViewEvent(webview::kEventExitFullscreen, std::move(args)))); | 1499 new GuestViewEvent(webview::kEventExitFullscreen, std::move(args)))); |
| 1500 } | 1500 } |
| 1501 // Since we changed fullscreen state, sending a Resize message ensures that | 1501 // Since we changed fullscreen state, sending a Resize message ensures that |
| 1502 // renderer/ sees the change. | 1502 // renderer/ sees the change. |
| 1503 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); | 1503 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); |
| 1504 } | 1504 } |
| 1505 | 1505 |
| 1506 } // namespace extensions | 1506 } // namespace extensions |
| OLD | NEW |