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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 698253004: Reland: Implement Aura side of unified touch text selection for contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Without RenderWidgetHostDelegate part (on top of crrev.com/1162373002) Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "content/browser/browser_plugin/browser_plugin_guest.h" 11 #include "content/browser/browser_plugin/browser_plugin_guest.h"
12 #include "content/browser/download/drag_download_util.h" 12 #include "content/browser/download/drag_download_util.h"
13 #include "content/browser/frame_host/interstitial_page_impl.h" 13 #include "content/browser/frame_host/interstitial_page_impl.h"
14 #include "content/browser/frame_host/navigation_entry_impl.h" 14 #include "content/browser/frame_host/navigation_entry_impl.h"
15 #include "content/browser/renderer_host/dip_util.h" 15 #include "content/browser/renderer_host/dip_util.h"
16 #include "content/browser/renderer_host/input/touch_selection_controller_client_ aura.h"
16 #include "content/browser/renderer_host/overscroll_controller.h" 17 #include "content/browser/renderer_host/overscroll_controller.h"
17 #include "content/browser/renderer_host/render_view_host_factory.h" 18 #include "content/browser/renderer_host/render_view_host_factory.h"
18 #include "content/browser/renderer_host/render_view_host_impl.h" 19 #include "content/browser/renderer_host/render_view_host_impl.h"
19 #include "content/browser/renderer_host/render_widget_host_impl.h" 20 #include "content/browser/renderer_host/render_widget_host_impl.h"
20 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 21 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
21 #include "content/browser/renderer_host/web_input_event_aura.h" 22 #include "content/browser/renderer_host/web_input_event_aura.h"
22 #include "content/browser/web_contents/aura/gesture_nav_simple.h" 23 #include "content/browser/web_contents/aura/gesture_nav_simple.h"
23 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h" 24 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
24 #include "content/browser/web_contents/touch_editable_impl_aura.h"
25 #include "content/browser/web_contents/web_contents_impl.h" 25 #include "content/browser/web_contents/web_contents_impl.h"
26 #include "content/public/browser/content_browser_client.h" 26 #include "content/public/browser/content_browser_client.h"
27 #include "content/public/browser/notification_observer.h" 27 #include "content/public/browser/notification_observer.h"
28 #include "content/public/browser/notification_registrar.h" 28 #include "content/public/browser/notification_registrar.h"
29 #include "content/public/browser/notification_source.h" 29 #include "content/public/browser/notification_source.h"
30 #include "content/public/browser/notification_types.h" 30 #include "content/public/browser/notification_types.h"
31 #include "content/public/browser/overscroll_configuration.h" 31 #include "content/public/browser/overscroll_configuration.h"
32 #include "content/public/browser/render_view_host.h" 32 #include "content/public/browser/render_view_host.h"
33 #include "content/public/browser/render_widget_host.h" 33 #include "content/public/browser/render_widget_host.h"
34 #include "content/public/browser/render_widget_host_view.h" 34 #include "content/public/browser/render_widget_host_view.h"
(...skipping 21 matching lines...) Expand all
56 #include "ui/base/dragdrop/os_exchange_data.h" 56 #include "ui/base/dragdrop/os_exchange_data.h"
57 #include "ui/base/hit_test.h" 57 #include "ui/base/hit_test.h"
58 #include "ui/compositor/layer.h" 58 #include "ui/compositor/layer.h"
59 #include "ui/events/event.h" 59 #include "ui/events/event.h"
60 #include "ui/events/event_utils.h" 60 #include "ui/events/event_utils.h"
61 #include "ui/gfx/canvas.h" 61 #include "ui/gfx/canvas.h"
62 #include "ui/gfx/image/image.h" 62 #include "ui/gfx/image/image.h"
63 #include "ui/gfx/image/image_png_rep.h" 63 #include "ui/gfx/image/image_png_rep.h"
64 #include "ui/gfx/image/image_skia.h" 64 #include "ui/gfx/image/image_skia.h"
65 #include "ui/gfx/screen.h" 65 #include "ui/gfx/screen.h"
66 #include "ui/touch_selection/touch_selection_controller.h"
66 #include "ui/wm/public/drag_drop_client.h" 67 #include "ui/wm/public/drag_drop_client.h"
67 #include "ui/wm/public/drag_drop_delegate.h" 68 #include "ui/wm/public/drag_drop_delegate.h"
68 69
69 namespace content { 70 namespace content {
70 WebContentsView* CreateWebContentsView( 71 WebContentsView* CreateWebContentsView(
71 WebContentsImpl* web_contents, 72 WebContentsImpl* web_contents,
72 WebContentsViewDelegate* delegate, 73 WebContentsViewDelegate* delegate,
73 RenderViewHostDelegateView** render_view_host_delegate_view) { 74 RenderViewHostDelegateView** render_view_host_delegate_view) {
74 WebContentsViewAura* rv = new WebContentsViewAura(web_contents, delegate); 75 WebContentsViewAura* rv = new WebContentsViewAura(web_contents, delegate);
75 *render_view_host_delegate_view = rv; 76 *render_view_host_delegate_view = rv;
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 524 }
524 #endif 525 #endif
525 } 526 }
526 } 527 }
527 528
528 void OnWindowBoundsChanged(aura::Window* window, 529 void OnWindowBoundsChanged(aura::Window* window,
529 const gfx::Rect& old_bounds, 530 const gfx::Rect& old_bounds,
530 const gfx::Rect& new_bounds) override { 531 const gfx::Rect& new_bounds) override {
531 if (window == host_window_ || window == view_->window_) { 532 if (window == host_window_ || window == view_->window_) {
532 SendScreenRects(); 533 SendScreenRects();
533 if (view_->touch_editable_) 534 if (old_bounds.origin() != new_bounds.origin()) {
534 view_->touch_editable_->UpdateEditingController(); 535 TouchSelectionControllerClientAura* selection_controller_client =
536 view_->GetSelectionControllerClient();
537 if (selection_controller_client)
538 selection_controller_client->OnWindowMoved();
539 }
535 #if defined(OS_WIN) 540 #if defined(OS_WIN)
536 } else { 541 } else {
537 UpdateConstrainedWindows(NULL); 542 UpdateConstrainedWindows(NULL);
538 #endif 543 #endif
539 } 544 }
540 } 545 }
541 546
542 void OnWindowDestroying(aura::Window* window) override { 547 void OnWindowDestroying(aura::Window* window) override {
543 if (window == host_window_) { 548 if (window == host_window_) {
544 host_window_->RemoveObserver(this); 549 host_window_->RemoveObserver(this);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 WebContentsViewAura::WebContentsViewAura(WebContentsImpl* web_contents, 647 WebContentsViewAura::WebContentsViewAura(WebContentsImpl* web_contents,
643 WebContentsViewDelegate* delegate) 648 WebContentsViewDelegate* delegate)
644 : web_contents_(web_contents), 649 : web_contents_(web_contents),
645 delegate_(delegate), 650 delegate_(delegate),
646 current_drag_op_(blink::WebDragOperationNone), 651 current_drag_op_(blink::WebDragOperationNone),
647 drag_dest_delegate_(NULL), 652 drag_dest_delegate_(NULL),
648 current_rvh_for_drag_(NULL), 653 current_rvh_for_drag_(NULL),
649 current_overscroll_gesture_(OVERSCROLL_NONE), 654 current_overscroll_gesture_(OVERSCROLL_NONE),
650 completed_overscroll_gesture_(OVERSCROLL_NONE), 655 completed_overscroll_gesture_(OVERSCROLL_NONE),
651 navigation_overlay_(nullptr), 656 navigation_overlay_(nullptr),
652 touch_editable_(TouchEditableImplAura::Create()),
653 is_or_was_visible_(false) { 657 is_or_was_visible_(false) {
654 } 658 }
655 659
656 //////////////////////////////////////////////////////////////////////////////// 660 ////////////////////////////////////////////////////////////////////////////////
657 // WebContentsViewAura, private: 661 // WebContentsViewAura, private:
658 662
659 WebContentsViewAura::~WebContentsViewAura() { 663 WebContentsViewAura::~WebContentsViewAura() {
660 if (!window_) 664 if (!window_)
661 return; 665 return;
662 666
663 window_observer_.reset(); 667 window_observer_.reset();
664 window_->RemoveObserver(this); 668 window_->RemoveObserver(this);
665 669
666 // Window needs a valid delegate during its destructor, so we explicitly 670 // Window needs a valid delegate during its destructor, so we explicitly
667 // delete it here. 671 // delete it here.
668 window_.reset(); 672 window_.reset();
669 } 673 }
670 674
671 void WebContentsViewAura::SetTouchEditableForTest(
672 TouchEditableImplAura* touch_editable) {
673 touch_editable_.reset(touch_editable);
674 AttachTouchEditableToRenderView();
675 }
676
677 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { 675 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) {
678 if (web_contents_->GetInterstitialPage()) 676 if (web_contents_->GetInterstitialPage())
679 web_contents_->GetInterstitialPage()->SetSize(size); 677 web_contents_->GetInterstitialPage()->SetSize(size);
680 RenderWidgetHostView* rwhv = 678 RenderWidgetHostView* rwhv =
681 web_contents_->GetRenderWidgetHostView(); 679 web_contents_->GetRenderWidgetHostView();
682 if (rwhv) 680 if (rwhv)
683 rwhv->SetSize(size); 681 rwhv->SetSize(size);
684 } 682 }
685 683
686 void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) { 684 void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) {
(...skipping 29 matching lines...) Expand all
716 if (!navigation_overlay_) { 714 if (!navigation_overlay_) {
717 navigation_overlay_.reset( 715 navigation_overlay_.reset(
718 new OverscrollNavigationOverlay(web_contents_, window_.get())); 716 new OverscrollNavigationOverlay(web_contents_, window_.get()));
719 } 717 }
720 } 718 }
721 719
722 void WebContentsViewAura::CompleteOverscrollNavigation(OverscrollMode mode) { 720 void WebContentsViewAura::CompleteOverscrollNavigation(OverscrollMode mode) {
723 if (!web_contents_->GetRenderWidgetHostView()) 721 if (!web_contents_->GetRenderWidgetHostView())
724 return; 722 return;
725 navigation_overlay_->relay_delegate()->OnOverscrollComplete(mode); 723 navigation_overlay_->relay_delegate()->OnOverscrollComplete(mode);
726 if (touch_editable_) 724 ui::TouchSelectionController* selection_controller = GetSelectionController();
727 touch_editable_->OverscrollCompleted(); 725 if (selection_controller)
728 } 726 selection_controller->HideAndDisallowShowingAutomatically();
729
730 void WebContentsViewAura::AttachTouchEditableToRenderView() {
731 if (!touch_editable_)
732 return;
733 RenderWidgetHostViewAura* rwhva = ToRenderWidgetHostViewAura(
734 web_contents_->GetRenderWidgetHostView());
735 touch_editable_->AttachToView(rwhva);
736 } 727 }
737 728
738 void WebContentsViewAura::OverscrollUpdateForWebContentsDelegate( 729 void WebContentsViewAura::OverscrollUpdateForWebContentsDelegate(
739 float delta_y) { 730 float delta_y) {
740 if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled()) 731 if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled())
741 web_contents_->GetDelegate()->OverscrollUpdate(delta_y); 732 web_contents_->GetDelegate()->OverscrollUpdate(delta_y);
742 } 733 }
743 734
735 ui::TouchSelectionController* WebContentsViewAura::GetSelectionController()
736 const {
737 RenderWidgetHostViewAura* view =
738 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
739 return view ? view->selection_controller() : nullptr;
740 }
741
742 TouchSelectionControllerClientAura*
743 WebContentsViewAura::GetSelectionControllerClient() const {
744 RenderWidgetHostViewAura* view =
745 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
746 return view ? view->selection_controller_client() : nullptr;
747 }
748
744 //////////////////////////////////////////////////////////////////////////////// 749 ////////////////////////////////////////////////////////////////////////////////
745 // WebContentsViewAura, WebContentsView implementation: 750 // WebContentsViewAura, WebContentsView implementation:
746 751
747 gfx::NativeView WebContentsViewAura::GetNativeView() const { 752 gfx::NativeView WebContentsViewAura::GetNativeView() const {
748 return window_.get(); 753 return window_.get();
749 } 754 }
750 755
751 gfx::NativeView WebContentsViewAura::GetContentNativeView() const { 756 gfx::NativeView WebContentsViewAura::GetContentNativeView() const {
752 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 757 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
753 return rwhv ? rwhv->GetNativeView() : NULL; 758 return rwhv ? rwhv->GetNativeView() : NULL;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 // this actually is happening (and somebody isn't accidentally creating the 878 // this actually is happening (and somebody isn't accidentally creating the
874 // view twice), we check for the RVH Factory, which will be set when we're 879 // view twice), we check for the RVH Factory, which will be set when we're
875 // making special ones (which go along with the special views). 880 // making special ones (which go along with the special views).
876 DCHECK(RenderViewHostFactory::has_factory()); 881 DCHECK(RenderViewHostFactory::has_factory());
877 return static_cast<RenderWidgetHostViewBase*>( 882 return static_cast<RenderWidgetHostViewBase*>(
878 render_widget_host->GetView()); 883 render_widget_host->GetView());
879 } 884 }
880 885
881 RenderWidgetHostViewAura* view = 886 RenderWidgetHostViewAura* view =
882 new RenderWidgetHostViewAura(render_widget_host, is_guest_view_hack); 887 new RenderWidgetHostViewAura(render_widget_host, is_guest_view_hack);
888
sadrul 2015/06/30 18:33:12 -
mohsen 2015/07/03 18:07:23 Done.
883 view->InitAsChild(NULL); 889 view->InitAsChild(NULL);
884 GetNativeView()->AddChild(view->GetNativeView()); 890 GetNativeView()->AddChild(view->GetNativeView());
885 891
886 RenderWidgetHostImpl* host_impl = 892 RenderWidgetHostImpl* host_impl =
887 RenderWidgetHostImpl::From(render_widget_host); 893 RenderWidgetHostImpl::From(render_widget_host);
888 894
889 if (!host_impl->is_hidden()) 895 if (!host_impl->is_hidden())
890 view->Show(); 896 view->Show();
891 897
892 // We listen to drag drop events in the newly created view's window. 898 // We listen to drag drop events in the newly created view's window.
893 aura::client::SetDragDropDelegate(view->GetNativeView(), this); 899 aura::client::SetDragDropDelegate(view->GetNativeView(), this);
894 900
895 if (view->overscroll_controller() && 901 if (view->overscroll_controller() &&
896 (!web_contents_->GetDelegate() || 902 (!web_contents_->GetDelegate() ||
897 web_contents_->GetDelegate()->CanOverscrollContent())) { 903 web_contents_->GetDelegate()->CanOverscrollContent())) {
898 InstallOverscrollControllerDelegate(view); 904 InstallOverscrollControllerDelegate(view);
899 } 905 }
900 906
901 AttachTouchEditableToRenderView();
902 return view; 907 return view;
903 } 908 }
904 909
905 RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForPopupWidget( 910 RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForPopupWidget(
906 RenderWidgetHost* render_widget_host) { 911 RenderWidgetHost* render_widget_host) {
907 return new RenderWidgetHostViewAura(render_widget_host, false); 912 return new RenderWidgetHostViewAura(render_widget_host, false);
908 } 913 }
909 914
910 void WebContentsViewAura::SetPageTitle(const base::string16& title) { 915 void WebContentsViewAura::SetPageTitle(const base::string16& title) {
911 window_->SetTitle(title); 916 window_->SetTitle(title);
912 } 917 }
913 918
914 void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) { 919 void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) {
915 } 920 }
916 921
917 void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* host) { 922 void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* host) {
918 AttachTouchEditableToRenderView();
919 } 923 }
920 924
921 void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) { 925 void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) {
922 RenderWidgetHostViewAura* view = 926 RenderWidgetHostViewAura* view =
923 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView()); 927 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
924 if (view) { 928 if (view) {
925 view->SetOverscrollControllerEnabled(enabled); 929 view->SetOverscrollControllerEnabled(enabled);
926 if (enabled) 930 if (enabled)
927 InstallOverscrollControllerDelegate(view); 931 InstallOverscrollControllerDelegate(view);
928 } 932 }
929 933
930 if (!enabled) { 934 if (!enabled) {
931 navigation_overlay_.reset(); 935 navigation_overlay_.reset();
932 } else if (!navigation_overlay_) { 936 } else if (!navigation_overlay_) {
933 navigation_overlay_.reset( 937 navigation_overlay_.reset(
934 new OverscrollNavigationOverlay(web_contents_, window_.get())); 938 new OverscrollNavigationOverlay(web_contents_, window_.get()));
935 } 939 }
936 } 940 }
937 941
938 //////////////////////////////////////////////////////////////////////////////// 942 ////////////////////////////////////////////////////////////////////////////////
939 // WebContentsViewAura, RenderViewHostDelegateView implementation: 943 // WebContentsViewAura, RenderViewHostDelegateView implementation:
940 944
941 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, 945 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host,
942 const ContextMenuParams& params) { 946 const ContextMenuParams& params) {
943 if (touch_editable_) { 947 ui::TouchSelectionController* selection_controller = GetSelectionController();
944 touch_editable_->EndTouchEditing(false); 948 if (selection_controller)
945 } 949 selection_controller->HideAndDisallowShowingAutomatically();
946 if (delegate_) { 950 if (delegate_) {
947 RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura( 951 RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura(
948 web_contents_->GetRenderWidgetHostView()); 952 web_contents_->GetRenderWidgetHostView());
949 if (view) 953 if (view)
950 view->OnShowContextMenu(); 954 view->OnShowContextMenu();
951 955
952 delegate_->ShowContextMenu(render_frame_host, params); 956 delegate_->ShowContextMenu(render_frame_host, params);
953 // WARNING: we may have been deleted during the call to ShowContextMenu(). 957 // WARNING: we may have been deleted during the call to ShowContextMenu().
954 } 958 }
955 } 959 }
956 960
957 void WebContentsViewAura::StartDragging( 961 void WebContentsViewAura::StartDragging(
958 const DropData& drop_data, 962 const DropData& drop_data,
959 blink::WebDragOperationsMask operations, 963 blink::WebDragOperationsMask operations,
960 const gfx::ImageSkia& image, 964 const gfx::ImageSkia& image,
961 const gfx::Vector2d& image_offset, 965 const gfx::Vector2d& image_offset,
962 const DragEventSourceInfo& event_info) { 966 const DragEventSourceInfo& event_info) {
963 aura::Window* root_window = GetNativeView()->GetRootWindow(); 967 aura::Window* root_window = GetNativeView()->GetRootWindow();
964 if (!aura::client::GetDragDropClient(root_window)) { 968 if (!aura::client::GetDragDropClient(root_window)) {
965 web_contents_->SystemDragEnded(); 969 web_contents_->SystemDragEnded();
966 return; 970 return;
967 } 971 }
968 972
969 if (touch_editable_) 973 ui::TouchSelectionController* selection_controller = GetSelectionController();
970 touch_editable_->EndTouchEditing(false); 974 if (selection_controller)
971 975 selection_controller->HideAndDisallowShowingAutomatically();
972 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); 976 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider();
973 PrepareDragData(drop_data, provider, web_contents_); 977 PrepareDragData(drop_data, provider, web_contents_);
974 978
975 ui::OSExchangeData data(provider); // takes ownership of |provider|. 979 ui::OSExchangeData data(provider); // takes ownership of |provider|.
976 980
977 if (!image.isNull()) 981 if (!image.isNull())
978 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); 982 drag_utils::SetDragImageOnDataObject(image, image_offset, &data);
979 983
980 scoped_ptr<WebDragSourceAura> drag_source( 984 scoped_ptr<WebDragSourceAura> drag_source(
981 new WebDragSourceAura(GetNativeView(), web_contents_)); 985 new WebDragSourceAura(GetNativeView(), web_contents_));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 web_contents_->GetDelegate()->OverscrollComplete(); 1077 web_contents_->GetDelegate()->OverscrollComplete();
1074 } 1078 }
1075 CompleteOverscrollNavigation(mode); 1079 CompleteOverscrollNavigation(mode);
1076 } 1080 }
1077 1081
1078 void WebContentsViewAura::OnOverscrollModeChange(OverscrollMode old_mode, 1082 void WebContentsViewAura::OnOverscrollModeChange(OverscrollMode old_mode,
1079 OverscrollMode new_mode) { 1083 OverscrollMode new_mode) {
1080 if (old_mode == OVERSCROLL_NORTH || old_mode == OVERSCROLL_SOUTH) 1084 if (old_mode == OVERSCROLL_NORTH || old_mode == OVERSCROLL_SOUTH)
1081 OverscrollUpdateForWebContentsDelegate(0); 1085 OverscrollUpdateForWebContentsDelegate(0);
1082 1086
1083 if (touch_editable_) {
1084 if (new_mode == OVERSCROLL_NONE)
1085 touch_editable_->OverscrollCompleted();
1086 else
1087 touch_editable_->OverscrollStarted();
1088 }
1089
1090 current_overscroll_gesture_ = new_mode; 1087 current_overscroll_gesture_ = new_mode;
1091 navigation_overlay_->relay_delegate()->OnOverscrollModeChange(old_mode, 1088 navigation_overlay_->relay_delegate()->OnOverscrollModeChange(old_mode,
1092 new_mode); 1089 new_mode);
1093 completed_overscroll_gesture_ = OVERSCROLL_NONE; 1090 completed_overscroll_gesture_ = OVERSCROLL_NONE;
1094 } 1091 }
1095 1092
1096 //////////////////////////////////////////////////////////////////////////////// 1093 ////////////////////////////////////////////////////////////////////////////////
1097 // WebContentsViewAura, aura::WindowDelegate implementation: 1094 // WebContentsViewAura, aura::WindowDelegate implementation:
1098 1095
1099 gfx::Size WebContentsViewAura::GetMinimumSize() const { 1096 gfx::Size WebContentsViewAura::GetMinimumSize() const {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 if (visible) { 1321 if (visible) {
1325 if (!web_contents_->should_normally_be_visible()) 1322 if (!web_contents_->should_normally_be_visible())
1326 web_contents_->WasShown(); 1323 web_contents_->WasShown();
1327 } else { 1324 } else {
1328 if (web_contents_->should_normally_be_visible()) 1325 if (web_contents_->should_normally_be_visible())
1329 web_contents_->WasHidden(); 1326 web_contents_->WasHidden();
1330 } 1327 }
1331 } 1328 }
1332 1329
1333 } // namespace content 1330 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698