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

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

Issue 2240983003: Move |ScopedWebInputEvent| and |WebInputEventTraits| from |content::| to "ui/events/blink" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move |ScopedWebInputEvent| and |WebInputEventTraits| from |content::| to |ui::| Created 4 years, 4 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_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "content/browser/site_instance_impl.h" 72 #include "content/browser/site_instance_impl.h"
73 #include "content/browser/wake_lock/wake_lock_service_context.h" 73 #include "content/browser/wake_lock/wake_lock_service_context.h"
74 #include "content/browser/web_contents/web_contents_view_child_frame.h" 74 #include "content/browser/web_contents/web_contents_view_child_frame.h"
75 #include "content/browser/web_contents/web_contents_view_guest.h" 75 #include "content/browser/web_contents/web_contents_view_guest.h"
76 #include "content/browser/webui/generic_handler.h" 76 #include "content/browser/webui/generic_handler.h"
77 #include "content/browser/webui/web_ui_controller_factory_registry.h" 77 #include "content/browser/webui/web_ui_controller_factory_registry.h"
78 #include "content/browser/webui/web_ui_impl.h" 78 #include "content/browser/webui/web_ui_impl.h"
79 #include "content/common/browser_plugin/browser_plugin_constants.h" 79 #include "content/common/browser_plugin/browser_plugin_constants.h"
80 #include "content/common/browser_plugin/browser_plugin_messages.h" 80 #include "content/common/browser_plugin/browser_plugin_messages.h"
81 #include "content/common/frame_messages.h" 81 #include "content/common/frame_messages.h"
82 #include "content/common/input/web_input_event_traits.h"
83 #include "content/common/input_messages.h" 82 #include "content/common/input_messages.h"
84 #include "content/common/page_messages.h" 83 #include "content/common/page_messages.h"
85 #include "content/common/page_state_serialization.h" 84 #include "content/common/page_state_serialization.h"
86 #include "content/common/site_isolation_policy.h" 85 #include "content/common/site_isolation_policy.h"
87 #include "content/common/view_messages.h" 86 #include "content/common/view_messages.h"
88 #include "content/public/browser/ax_event_notification_details.h" 87 #include "content/public/browser/ax_event_notification_details.h"
89 #include "content/public/browser/browser_context.h" 88 #include "content/public/browser/browser_context.h"
90 #include "content/public/browser/browser_plugin_guest_manager.h" 89 #include "content/public/browser/browser_plugin_guest_manager.h"
91 #include "content/public/browser/content_browser_client.h" 90 #include "content/public/browser/content_browser_client.h"
92 #include "content/public/browser/devtools_agent_host.h" 91 #include "content/public/browser/devtools_agent_host.h"
(...skipping 27 matching lines...) Expand all
120 #include "device/geolocation/geolocation_service_context.h" 119 #include "device/geolocation/geolocation_service_context.h"
121 #include "net/base/url_util.h" 120 #include "net/base/url_util.h"
122 #include "net/http/http_cache.h" 121 #include "net/http/http_cache.h"
123 #include "net/http/http_transaction_factory.h" 122 #include "net/http/http_transaction_factory.h"
124 #include "net/url_request/url_request_context.h" 123 #include "net/url_request/url_request_context.h"
125 #include "net/url_request/url_request_context_getter.h" 124 #include "net/url_request/url_request_context_getter.h"
126 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 125 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
127 #include "third_party/skia/include/core/SkBitmap.h" 126 #include "third_party/skia/include/core/SkBitmap.h"
128 #include "ui/accessibility/ax_tree_combiner.h" 127 #include "ui/accessibility/ax_tree_combiner.h"
129 #include "ui/base/layout.h" 128 #include "ui/base/layout.h"
129 #include "ui/events/blink/web_input_event_traits.h"
130 #include "ui/gl/gl_switches.h" 130 #include "ui/gl/gl_switches.h"
131 131
132 #if defined(OS_ANDROID) 132 #if defined(OS_ANDROID)
133 #include "content/browser/android/content_video_view.h" 133 #include "content/browser/android/content_video_view.h"
134 #include "content/browser/android/date_time_chooser_android.h" 134 #include "content/browser/android/date_time_chooser_android.h"
135 #include "content/browser/media/android/media_web_contents_observer_android.h" 135 #include "content/browser/media/android/media_web_contents_observer_android.h"
136 #include "content/browser/web_contents/web_contents_android.h" 136 #include "content/browser/web_contents/web_contents_android.h"
137 #endif // OS_ANDROID 137 #endif // OS_ANDROID
138 138
139 #if defined(OS_MACOSX) 139 #if defined(OS_MACOSX)
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 bool WebContentsImpl::HandleWheelEvent( 1779 bool WebContentsImpl::HandleWheelEvent(
1780 const blink::WebMouseWheelEvent& event) { 1780 const blink::WebMouseWheelEvent& event) {
1781 #if !defined(OS_MACOSX) 1781 #if !defined(OS_MACOSX)
1782 // On platforms other than Mac, control+mousewheel may change zoom. On Mac, 1782 // On platforms other than Mac, control+mousewheel may change zoom. On Mac,
1783 // this isn't done for two reasons: 1783 // this isn't done for two reasons:
1784 // -the OS already has a gesture to do this through pinch-zoom 1784 // -the OS already has a gesture to do this through pinch-zoom
1785 // -if a user starts an inertial scroll, let's go, and presses control 1785 // -if a user starts an inertial scroll, let's go, and presses control
1786 // (i.e. control+tab) then the OS's buffered scroll events will come in 1786 // (i.e. control+tab) then the OS's buffered scroll events will come in
1787 // with control key set which isn't what the user wants 1787 // with control key set which isn't what the user wants
1788 if (delegate_ && event.wheelTicksY && 1788 if (delegate_ && event.wheelTicksY &&
1789 !WebInputEventTraits::CanCauseScroll(event)) { 1789 !ui::WebInputEventTraits::CanCauseScroll(event)) {
1790 // Count only integer cumulative scrolls as zoom events; this handles 1790 // Count only integer cumulative scrolls as zoom events; this handles
1791 // smooth scroll and regular scroll device behavior. 1791 // smooth scroll and regular scroll device behavior.
1792 zoom_scroll_remainder_ += event.wheelTicksY; 1792 zoom_scroll_remainder_ += event.wheelTicksY;
1793 int whole_zoom_scroll_remainder_ = std::lround(zoom_scroll_remainder_); 1793 int whole_zoom_scroll_remainder_ = std::lround(zoom_scroll_remainder_);
1794 zoom_scroll_remainder_ -= whole_zoom_scroll_remainder_; 1794 zoom_scroll_remainder_ -= whole_zoom_scroll_remainder_;
1795 if (whole_zoom_scroll_remainder_ != 0) { 1795 if (whole_zoom_scroll_remainder_ != 0) {
1796 delegate_->ContentsZoomChange(whole_zoom_scroll_remainder_ > 0); 1796 delegate_->ContentsZoomChange(whole_zoom_scroll_remainder_ > 0);
1797 } 1797 }
1798 return true; 1798 return true;
1799 } 1799 }
(...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after
5217 for (RenderViewHost* render_view_host : render_view_host_set) 5217 for (RenderViewHost* render_view_host : render_view_host_set)
5218 render_view_host->OnWebkitPreferencesChanged(); 5218 render_view_host->OnWebkitPreferencesChanged();
5219 } 5219 }
5220 5220
5221 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5221 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5222 JavaScriptDialogManager* dialog_manager) { 5222 JavaScriptDialogManager* dialog_manager) {
5223 dialog_manager_ = dialog_manager; 5223 dialog_manager_ = dialog_manager;
5224 } 5224 }
5225 5225
5226 } // namespace content 5226 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698