OLD | NEW |
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" | |
17 #include "content/browser/renderer_host/overscroll_controller.h" | 16 #include "content/browser/renderer_host/overscroll_controller.h" |
18 #include "content/browser/renderer_host/render_view_host_factory.h" | 17 #include "content/browser/renderer_host/render_view_host_factory.h" |
19 #include "content/browser/renderer_host/render_view_host_impl.h" | 18 #include "content/browser/renderer_host/render_view_host_impl.h" |
20 #include "content/browser/renderer_host/render_widget_host_impl.h" | 19 #include "content/browser/renderer_host/render_widget_host_impl.h" |
21 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 20 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
22 #include "content/browser/renderer_host/web_input_event_aura.h" | 21 #include "content/browser/renderer_host/web_input_event_aura.h" |
23 #include "content/browser/web_contents/aura/gesture_nav_simple.h" | 22 #include "content/browser/web_contents/aura/gesture_nav_simple.h" |
24 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h" | 23 #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 Loading... |
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" | |
67 #include "ui/wm/public/drag_drop_client.h" | 66 #include "ui/wm/public/drag_drop_client.h" |
68 #include "ui/wm/public/drag_drop_delegate.h" | 67 #include "ui/wm/public/drag_drop_delegate.h" |
69 | 68 |
70 namespace content { | 69 namespace content { |
71 WebContentsView* CreateWebContentsView( | 70 WebContentsView* CreateWebContentsView( |
72 WebContentsImpl* web_contents, | 71 WebContentsImpl* web_contents, |
73 WebContentsViewDelegate* delegate, | 72 WebContentsViewDelegate* delegate, |
74 RenderViewHostDelegateView** render_view_host_delegate_view) { | 73 RenderViewHostDelegateView** render_view_host_delegate_view) { |
75 WebContentsViewAura* rv = new WebContentsViewAura(web_contents, delegate); | 74 WebContentsViewAura* rv = new WebContentsViewAura(web_contents, delegate); |
76 *render_view_host_delegate_view = rv; | 75 *render_view_host_delegate_view = rv; |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 523 } |
525 #endif | 524 #endif |
526 } | 525 } |
527 } | 526 } |
528 | 527 |
529 void OnWindowBoundsChanged(aura::Window* window, | 528 void OnWindowBoundsChanged(aura::Window* window, |
530 const gfx::Rect& old_bounds, | 529 const gfx::Rect& old_bounds, |
531 const gfx::Rect& new_bounds) override { | 530 const gfx::Rect& new_bounds) override { |
532 if (window == host_window_ || window == view_->window_) { | 531 if (window == host_window_ || window == view_->window_) { |
533 SendScreenRects(); | 532 SendScreenRects(); |
534 if (old_bounds.origin() != new_bounds.origin()) { | 533 if (view_->touch_editable_) |
535 TouchSelectionControllerClientAura* selection_controller_client = | 534 view_->touch_editable_->UpdateEditingController(); |
536 view_->GetSelectionControllerClient(); | |
537 if (selection_controller_client) | |
538 selection_controller_client->OnWindowMoved(); | |
539 } | |
540 #if defined(OS_WIN) | 535 #if defined(OS_WIN) |
541 } else { | 536 } else { |
542 UpdateConstrainedWindows(NULL); | 537 UpdateConstrainedWindows(NULL); |
543 #endif | 538 #endif |
544 } | 539 } |
545 } | 540 } |
546 | 541 |
547 void OnWindowDestroying(aura::Window* window) override { | 542 void OnWindowDestroying(aura::Window* window) override { |
548 if (window == host_window_) { | 543 if (window == host_window_) { |
549 host_window_->RemoveObserver(this); | 544 host_window_->RemoveObserver(this); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 WebContentsViewAura::WebContentsViewAura(WebContentsImpl* web_contents, | 642 WebContentsViewAura::WebContentsViewAura(WebContentsImpl* web_contents, |
648 WebContentsViewDelegate* delegate) | 643 WebContentsViewDelegate* delegate) |
649 : web_contents_(web_contents), | 644 : web_contents_(web_contents), |
650 delegate_(delegate), | 645 delegate_(delegate), |
651 current_drag_op_(blink::WebDragOperationNone), | 646 current_drag_op_(blink::WebDragOperationNone), |
652 drag_dest_delegate_(NULL), | 647 drag_dest_delegate_(NULL), |
653 current_rvh_for_drag_(NULL), | 648 current_rvh_for_drag_(NULL), |
654 current_overscroll_gesture_(OVERSCROLL_NONE), | 649 current_overscroll_gesture_(OVERSCROLL_NONE), |
655 completed_overscroll_gesture_(OVERSCROLL_NONE), | 650 completed_overscroll_gesture_(OVERSCROLL_NONE), |
656 navigation_overlay_(nullptr), | 651 navigation_overlay_(nullptr), |
| 652 touch_editable_(TouchEditableImplAura::Create()), |
657 is_or_was_visible_(false) { | 653 is_or_was_visible_(false) { |
658 } | 654 } |
659 | 655 |
660 //////////////////////////////////////////////////////////////////////////////// | 656 //////////////////////////////////////////////////////////////////////////////// |
661 // WebContentsViewAura, private: | 657 // WebContentsViewAura, private: |
662 | 658 |
663 WebContentsViewAura::~WebContentsViewAura() { | 659 WebContentsViewAura::~WebContentsViewAura() { |
664 if (!window_) | 660 if (!window_) |
665 return; | 661 return; |
666 | 662 |
667 window_observer_.reset(); | 663 window_observer_.reset(); |
668 window_->RemoveObserver(this); | 664 window_->RemoveObserver(this); |
669 | 665 |
670 // Window needs a valid delegate during its destructor, so we explicitly | 666 // Window needs a valid delegate during its destructor, so we explicitly |
671 // delete it here. | 667 // delete it here. |
672 window_.reset(); | 668 window_.reset(); |
673 } | 669 } |
674 | 670 |
| 671 void WebContentsViewAura::SetTouchEditableForTest( |
| 672 TouchEditableImplAura* touch_editable) { |
| 673 touch_editable_.reset(touch_editable); |
| 674 AttachTouchEditableToRenderView(); |
| 675 } |
| 676 |
675 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { | 677 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { |
676 if (web_contents_->GetInterstitialPage()) | 678 if (web_contents_->GetInterstitialPage()) |
677 web_contents_->GetInterstitialPage()->SetSize(size); | 679 web_contents_->GetInterstitialPage()->SetSize(size); |
678 RenderWidgetHostView* rwhv = | 680 RenderWidgetHostView* rwhv = |
679 web_contents_->GetRenderWidgetHostView(); | 681 web_contents_->GetRenderWidgetHostView(); |
680 if (rwhv) | 682 if (rwhv) |
681 rwhv->SetSize(size); | 683 rwhv->SetSize(size); |
682 } | 684 } |
683 | 685 |
684 void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) { | 686 void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) { |
(...skipping 29 matching lines...) Expand all Loading... |
714 if (!navigation_overlay_) { | 716 if (!navigation_overlay_) { |
715 navigation_overlay_.reset( | 717 navigation_overlay_.reset( |
716 new OverscrollNavigationOverlay(web_contents_, window_.get())); | 718 new OverscrollNavigationOverlay(web_contents_, window_.get())); |
717 } | 719 } |
718 } | 720 } |
719 | 721 |
720 void WebContentsViewAura::CompleteOverscrollNavigation(OverscrollMode mode) { | 722 void WebContentsViewAura::CompleteOverscrollNavigation(OverscrollMode mode) { |
721 if (!web_contents_->GetRenderWidgetHostView()) | 723 if (!web_contents_->GetRenderWidgetHostView()) |
722 return; | 724 return; |
723 navigation_overlay_->relay_delegate()->OnOverscrollComplete(mode); | 725 navigation_overlay_->relay_delegate()->OnOverscrollComplete(mode); |
724 ui::TouchSelectionController* selection_controller = GetSelectionController(); | 726 if (touch_editable_) |
725 if (selection_controller) | 727 touch_editable_->OverscrollCompleted(); |
726 selection_controller->HideAndDisallowShowingAutomatically(); | 728 } |
| 729 |
| 730 void WebContentsViewAura::AttachTouchEditableToRenderView() { |
| 731 if (!touch_editable_) |
| 732 return; |
| 733 RenderWidgetHostViewAura* rwhva = ToRenderWidgetHostViewAura( |
| 734 web_contents_->GetRenderWidgetHostView()); |
| 735 touch_editable_->AttachToView(rwhva); |
727 } | 736 } |
728 | 737 |
729 void WebContentsViewAura::OverscrollUpdateForWebContentsDelegate( | 738 void WebContentsViewAura::OverscrollUpdateForWebContentsDelegate( |
730 float delta_y) { | 739 float delta_y) { |
731 if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled()) | 740 if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled()) |
732 web_contents_->GetDelegate()->OverscrollUpdate(delta_y); | 741 web_contents_->GetDelegate()->OverscrollUpdate(delta_y); |
733 } | 742 } |
734 | 743 |
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 | |
749 //////////////////////////////////////////////////////////////////////////////// | 744 //////////////////////////////////////////////////////////////////////////////// |
750 // WebContentsViewAura, WebContentsView implementation: | 745 // WebContentsViewAura, WebContentsView implementation: |
751 | 746 |
752 gfx::NativeView WebContentsViewAura::GetNativeView() const { | 747 gfx::NativeView WebContentsViewAura::GetNativeView() const { |
753 return window_.get(); | 748 return window_.get(); |
754 } | 749 } |
755 | 750 |
756 gfx::NativeView WebContentsViewAura::GetContentNativeView() const { | 751 gfx::NativeView WebContentsViewAura::GetContentNativeView() const { |
757 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 752 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
758 return rwhv ? rwhv->GetNativeView() : NULL; | 753 return rwhv ? rwhv->GetNativeView() : NULL; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 | 891 |
897 // We listen to drag drop events in the newly created view's window. | 892 // We listen to drag drop events in the newly created view's window. |
898 aura::client::SetDragDropDelegate(view->GetNativeView(), this); | 893 aura::client::SetDragDropDelegate(view->GetNativeView(), this); |
899 | 894 |
900 if (view->overscroll_controller() && | 895 if (view->overscroll_controller() && |
901 (!web_contents_->GetDelegate() || | 896 (!web_contents_->GetDelegate() || |
902 web_contents_->GetDelegate()->CanOverscrollContent())) { | 897 web_contents_->GetDelegate()->CanOverscrollContent())) { |
903 InstallOverscrollControllerDelegate(view); | 898 InstallOverscrollControllerDelegate(view); |
904 } | 899 } |
905 | 900 |
| 901 AttachTouchEditableToRenderView(); |
906 return view; | 902 return view; |
907 } | 903 } |
908 | 904 |
909 RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForPopupWidget( | 905 RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForPopupWidget( |
910 RenderWidgetHost* render_widget_host) { | 906 RenderWidgetHost* render_widget_host) { |
911 return new RenderWidgetHostViewAura(render_widget_host, false); | 907 return new RenderWidgetHostViewAura(render_widget_host, false); |
912 } | 908 } |
913 | 909 |
914 void WebContentsViewAura::SetPageTitle(const base::string16& title) { | 910 void WebContentsViewAura::SetPageTitle(const base::string16& title) { |
915 window_->SetTitle(title); | 911 window_->SetTitle(title); |
916 } | 912 } |
917 | 913 |
918 void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) { | 914 void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) { |
919 } | 915 } |
920 | 916 |
921 void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* host) { | 917 void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* host) { |
| 918 AttachTouchEditableToRenderView(); |
922 } | 919 } |
923 | 920 |
924 void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) { | 921 void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) { |
925 RenderWidgetHostViewAura* view = | 922 RenderWidgetHostViewAura* view = |
926 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView()); | 923 ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView()); |
927 if (view) { | 924 if (view) { |
928 view->SetOverscrollControllerEnabled(enabled); | 925 view->SetOverscrollControllerEnabled(enabled); |
929 if (enabled) | 926 if (enabled) |
930 InstallOverscrollControllerDelegate(view); | 927 InstallOverscrollControllerDelegate(view); |
931 } | 928 } |
932 | 929 |
933 if (!enabled) { | 930 if (!enabled) { |
934 navigation_overlay_.reset(); | 931 navigation_overlay_.reset(); |
935 } else if (!navigation_overlay_) { | 932 } else if (!navigation_overlay_) { |
936 navigation_overlay_.reset( | 933 navigation_overlay_.reset( |
937 new OverscrollNavigationOverlay(web_contents_, window_.get())); | 934 new OverscrollNavigationOverlay(web_contents_, window_.get())); |
938 } | 935 } |
939 } | 936 } |
940 | 937 |
941 //////////////////////////////////////////////////////////////////////////////// | 938 //////////////////////////////////////////////////////////////////////////////// |
942 // WebContentsViewAura, RenderViewHostDelegateView implementation: | 939 // WebContentsViewAura, RenderViewHostDelegateView implementation: |
943 | 940 |
944 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, | 941 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, |
945 const ContextMenuParams& params) { | 942 const ContextMenuParams& params) { |
946 ui::TouchSelectionController* selection_controller = GetSelectionController(); | 943 if (touch_editable_) { |
947 if (selection_controller) | 944 touch_editable_->EndTouchEditing(false); |
948 selection_controller->HideAndDisallowShowingAutomatically(); | 945 } |
949 if (delegate_) { | 946 if (delegate_) { |
950 RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura( | 947 RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura( |
951 web_contents_->GetRenderWidgetHostView()); | 948 web_contents_->GetRenderWidgetHostView()); |
952 if (view) | 949 if (view) |
953 view->OnShowContextMenu(); | 950 view->OnShowContextMenu(); |
954 | 951 |
955 delegate_->ShowContextMenu(render_frame_host, params); | 952 delegate_->ShowContextMenu(render_frame_host, params); |
956 // WARNING: we may have been deleted during the call to ShowContextMenu(). | 953 // WARNING: we may have been deleted during the call to ShowContextMenu(). |
957 } | 954 } |
958 } | 955 } |
959 | 956 |
960 void WebContentsViewAura::StartDragging( | 957 void WebContentsViewAura::StartDragging( |
961 const DropData& drop_data, | 958 const DropData& drop_data, |
962 blink::WebDragOperationsMask operations, | 959 blink::WebDragOperationsMask operations, |
963 const gfx::ImageSkia& image, | 960 const gfx::ImageSkia& image, |
964 const gfx::Vector2d& image_offset, | 961 const gfx::Vector2d& image_offset, |
965 const DragEventSourceInfo& event_info) { | 962 const DragEventSourceInfo& event_info) { |
966 aura::Window* root_window = GetNativeView()->GetRootWindow(); | 963 aura::Window* root_window = GetNativeView()->GetRootWindow(); |
967 if (!aura::client::GetDragDropClient(root_window)) { | 964 if (!aura::client::GetDragDropClient(root_window)) { |
968 web_contents_->SystemDragEnded(); | 965 web_contents_->SystemDragEnded(); |
969 return; | 966 return; |
970 } | 967 } |
971 | 968 |
972 ui::TouchSelectionController* selection_controller = GetSelectionController(); | 969 if (touch_editable_) |
973 if (selection_controller) | 970 touch_editable_->EndTouchEditing(false); |
974 selection_controller->HideAndDisallowShowingAutomatically(); | 971 |
975 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); | 972 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); |
976 PrepareDragData(drop_data, provider, web_contents_); | 973 PrepareDragData(drop_data, provider, web_contents_); |
977 | 974 |
978 ui::OSExchangeData data(provider); // takes ownership of |provider|. | 975 ui::OSExchangeData data(provider); // takes ownership of |provider|. |
979 | 976 |
980 if (!image.isNull()) | 977 if (!image.isNull()) |
981 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); | 978 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); |
982 | 979 |
983 scoped_ptr<WebDragSourceAura> drag_source( | 980 scoped_ptr<WebDragSourceAura> drag_source( |
984 new WebDragSourceAura(GetNativeView(), web_contents_)); | 981 new WebDragSourceAura(GetNativeView(), web_contents_)); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 web_contents_->GetDelegate()->OverscrollComplete(); | 1073 web_contents_->GetDelegate()->OverscrollComplete(); |
1077 } | 1074 } |
1078 CompleteOverscrollNavigation(mode); | 1075 CompleteOverscrollNavigation(mode); |
1079 } | 1076 } |
1080 | 1077 |
1081 void WebContentsViewAura::OnOverscrollModeChange(OverscrollMode old_mode, | 1078 void WebContentsViewAura::OnOverscrollModeChange(OverscrollMode old_mode, |
1082 OverscrollMode new_mode) { | 1079 OverscrollMode new_mode) { |
1083 if (old_mode == OVERSCROLL_NORTH || old_mode == OVERSCROLL_SOUTH) | 1080 if (old_mode == OVERSCROLL_NORTH || old_mode == OVERSCROLL_SOUTH) |
1084 OverscrollUpdateForWebContentsDelegate(0); | 1081 OverscrollUpdateForWebContentsDelegate(0); |
1085 | 1082 |
| 1083 if (touch_editable_) { |
| 1084 if (new_mode == OVERSCROLL_NONE) |
| 1085 touch_editable_->OverscrollCompleted(); |
| 1086 else |
| 1087 touch_editable_->OverscrollStarted(); |
| 1088 } |
| 1089 |
1086 current_overscroll_gesture_ = new_mode; | 1090 current_overscroll_gesture_ = new_mode; |
1087 navigation_overlay_->relay_delegate()->OnOverscrollModeChange(old_mode, | 1091 navigation_overlay_->relay_delegate()->OnOverscrollModeChange(old_mode, |
1088 new_mode); | 1092 new_mode); |
1089 completed_overscroll_gesture_ = OVERSCROLL_NONE; | 1093 completed_overscroll_gesture_ = OVERSCROLL_NONE; |
1090 } | 1094 } |
1091 | 1095 |
1092 //////////////////////////////////////////////////////////////////////////////// | 1096 //////////////////////////////////////////////////////////////////////////////// |
1093 // WebContentsViewAura, aura::WindowDelegate implementation: | 1097 // WebContentsViewAura, aura::WindowDelegate implementation: |
1094 | 1098 |
1095 gfx::Size WebContentsViewAura::GetMinimumSize() const { | 1099 gfx::Size WebContentsViewAura::GetMinimumSize() const { |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 if (visible) { | 1320 if (visible) { |
1317 if (!web_contents_->should_normally_be_visible()) | 1321 if (!web_contents_->should_normally_be_visible()) |
1318 web_contents_->WasShown(); | 1322 web_contents_->WasShown(); |
1319 } else { | 1323 } else { |
1320 if (web_contents_->should_normally_be_visible()) | 1324 if (web_contents_->should_normally_be_visible()) |
1321 web_contents_->WasHidden(); | 1325 web_contents_->WasHidden(); |
1322 } | 1326 } |
1323 } | 1327 } |
1324 | 1328 |
1325 } // namespace content | 1329 } // namespace content |
OLD | NEW |