Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: components/guest_view/browser/guest_view_base.cc

Issue 2059533002: Change WebContentsDelegate::RunFileChooser to be frame based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 return embedder_web_contents()->GetDelegate()->OpenColorChooser( 658 return embedder_web_contents()->GetDelegate()->OpenColorChooser(
659 web_contents, color, suggestions); 659 web_contents, color, suggestions);
660 } 660 }
661 661
662 void GuestViewBase::ResizeDueToAutoResize(WebContents* web_contents, 662 void GuestViewBase::ResizeDueToAutoResize(WebContents* web_contents,
663 const gfx::Size& new_size) { 663 const gfx::Size& new_size) {
664 guest_host_->GuestResizeDueToAutoResize(new_size); 664 guest_host_->GuestResizeDueToAutoResize(new_size);
665 } 665 }
666 666
667 void GuestViewBase::RunFileChooser(WebContents* web_contents, 667 void GuestViewBase::RunFileChooser(content::RenderFrameHost* render_frame_host,
668 const content::FileChooserParams& params) { 668 const content::FileChooserParams& params) {
669 if (!attached() || !embedder_web_contents()->GetDelegate()) 669 if (!attached() || !embedder_web_contents()->GetDelegate())
670 return; 670 return;
671 671
672 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); 672 embedder_web_contents()->GetDelegate()->RunFileChooser(render_frame_host,
673 params);
673 } 674 }
674 675
675 bool GuestViewBase::ShouldFocusPageAfterCrash() { 676 bool GuestViewBase::ShouldFocusPageAfterCrash() {
676 // Focus is managed elsewhere. 677 // Focus is managed elsewhere.
677 return false; 678 return false;
678 } 679 }
679 680
680 bool GuestViewBase::PreHandleGestureEvent(WebContents* source, 681 bool GuestViewBase::PreHandleGestureEvent(WebContents* source,
681 const blink::WebGestureEvent& event) { 682 const blink::WebGestureEvent& event) {
682 return event.type == blink::WebGestureEvent::GesturePinchBegin || 683 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 885
885 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 886 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
886 bool due_to_auto_resize) { 887 bool due_to_auto_resize) {
887 if (due_to_auto_resize) 888 if (due_to_auto_resize)
888 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 889 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
889 DispatchOnResizeEvent(guest_size_, new_size); 890 DispatchOnResizeEvent(guest_size_, new_size);
890 guest_size_ = new_size; 891 guest_size_ = new_size;
891 } 892 }
892 893
893 } // namespace guest_view 894 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698