| 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/guest_view_base.h" | 5 #include "extensions/browser/guest_view/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/ui/zoom/page_zoom.h" | 9 #include "components/ui/zoom/page_zoom.h" |
| 10 #include "components/ui/zoom/zoom_controller.h" | 10 #include "components/ui/zoom/zoom_controller.h" |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 zoom_in ? content::PAGE_ZOOM_IN : content::PAGE_ZOOM_OUT); | 532 zoom_in ? content::PAGE_ZOOM_IN : content::PAGE_ZOOM_OUT); |
| 533 } | 533 } |
| 534 | 534 |
| 535 void GuestViewBase::HandleKeyboardEvent( | 535 void GuestViewBase::HandleKeyboardEvent( |
| 536 WebContents* source, | 536 WebContents* source, |
| 537 const content::NativeWebKeyboardEvent& event) { | 537 const content::NativeWebKeyboardEvent& event) { |
| 538 if (!attached()) | 538 if (!attached()) |
| 539 return; | 539 return; |
| 540 | 540 |
| 541 // Send the keyboard events back to the embedder to reprocess them. | 541 // Send the keyboard events back to the embedder to reprocess them. |
| 542 embedder_web_contents()->GetDelegate()->HandleKeyboardEvent(web_contents(), | 542 embedder_web_contents()->GetDelegate()-> |
| 543 event); | 543 HandleKeyboardEvent(embedder_web_contents(), event); |
| 544 } | 544 } |
| 545 | 545 |
| 546 void GuestViewBase::RunFileChooser(WebContents* web_contents, | 546 void GuestViewBase::RunFileChooser(WebContents* web_contents, |
| 547 const content::FileChooserParams& params) { | 547 const content::FileChooserParams& params) { |
| 548 if (!attached() || !embedder_web_contents()->GetDelegate()) | 548 if (!attached() || !embedder_web_contents()->GetDelegate()) |
| 549 return; | 549 return; |
| 550 | 550 |
| 551 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); | 551 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); |
| 552 } | 552 } |
| 553 | 553 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 // static | 701 // static |
| 702 void GuestViewBase::RegisterGuestViewTypes() { | 702 void GuestViewBase::RegisterGuestViewTypes() { |
| 703 AppViewGuest::Register(); | 703 AppViewGuest::Register(); |
| 704 ExtensionOptionsGuest::Register(); | 704 ExtensionOptionsGuest::Register(); |
| 705 MimeHandlerViewGuest::Register(); | 705 MimeHandlerViewGuest::Register(); |
| 706 SurfaceWorkerGuest::Register(); | 706 SurfaceWorkerGuest::Register(); |
| 707 WebViewGuest::Register(); | 707 WebViewGuest::Register(); |
| 708 } | 708 } |
| 709 | 709 |
| 710 } // namespace extensions | 710 } // namespace extensions |
| OLD | NEW |