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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 586 |
587 void GuestViewBase::LoadingStateChanged(content::WebContents* source, | 587 void GuestViewBase::LoadingStateChanged(content::WebContents* source, |
588 bool to_different_document) { | 588 bool to_different_document) { |
589 if (!attached() || !embedder_web_contents()->GetDelegate()) | 589 if (!attached() || !embedder_web_contents()->GetDelegate()) |
590 return; | 590 return; |
591 | 591 |
592 embedder_web_contents()->GetDelegate()->LoadingStateChanged( | 592 embedder_web_contents()->GetDelegate()->LoadingStateChanged( |
593 embedder_web_contents(), to_different_document); | 593 embedder_web_contents(), to_different_document); |
594 } | 594 } |
595 | 595 |
| 596 content::ColorChooser* GuestViewBase::OpenColorChooser( |
| 597 WebContents* web_contents, |
| 598 SkColor color, |
| 599 const std::vector<content::ColorSuggestion>& suggestions) { |
| 600 if (!attached() || !embedder_web_contents()->GetDelegate()) |
| 601 return nullptr; |
| 602 |
| 603 return embedder_web_contents()->GetDelegate()->OpenColorChooser( |
| 604 web_contents, color, suggestions); |
| 605 } |
| 606 |
596 void GuestViewBase::RunFileChooser(WebContents* web_contents, | 607 void GuestViewBase::RunFileChooser(WebContents* web_contents, |
597 const content::FileChooserParams& params) { | 608 const content::FileChooserParams& params) { |
598 if (!attached() || !embedder_web_contents()->GetDelegate()) | 609 if (!attached() || !embedder_web_contents()->GetDelegate()) |
599 return; | 610 return; |
600 | 611 |
601 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); | 612 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); |
602 } | 613 } |
603 | 614 |
604 bool GuestViewBase::ShouldFocusPageAfterCrash() { | 615 bool GuestViewBase::ShouldFocusPageAfterCrash() { |
605 // Focus is managed elsewhere. | 616 // Focus is managed elsewhere. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 void GuestViewBase::RegisterGuestViewTypes() { | 783 void GuestViewBase::RegisterGuestViewTypes() { |
773 AppViewGuest::Register(); | 784 AppViewGuest::Register(); |
774 ExtensionOptionsGuest::Register(); | 785 ExtensionOptionsGuest::Register(); |
775 ExtensionViewGuest::Register(); | 786 ExtensionViewGuest::Register(); |
776 MimeHandlerViewGuest::Register(); | 787 MimeHandlerViewGuest::Register(); |
777 SurfaceWorkerGuest::Register(); | 788 SurfaceWorkerGuest::Register(); |
778 WebViewGuest::Register(); | 789 WebViewGuest::Register(); |
779 } | 790 } |
780 | 791 |
781 } // namespace extensions | 792 } // namespace extensions |
OLD | NEW |