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

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

Issue 474213002: DevTools: control touch emulation from the browser side only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaselined Created 6 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 bool* is_keyboard_shortcut) OVERRIDE; 535 bool* is_keyboard_shortcut) OVERRIDE;
536 virtual void HandleKeyboardEvent( 536 virtual void HandleKeyboardEvent(
537 const NativeWebKeyboardEvent& event) OVERRIDE; 537 const NativeWebKeyboardEvent& event) OVERRIDE;
538 virtual bool HandleWheelEvent( 538 virtual bool HandleWheelEvent(
539 const blink::WebMouseWheelEvent& event) OVERRIDE; 539 const blink::WebMouseWheelEvent& event) OVERRIDE;
540 virtual bool PreHandleGestureEvent( 540 virtual bool PreHandleGestureEvent(
541 const blink::WebGestureEvent& event) OVERRIDE; 541 const blink::WebGestureEvent& event) OVERRIDE;
542 virtual bool HandleGestureEvent( 542 virtual bool HandleGestureEvent(
543 const blink::WebGestureEvent& event) OVERRIDE; 543 const blink::WebGestureEvent& event) OVERRIDE;
544 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE; 544 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE;
545 virtual void OnTouchEmulationEnabled(bool enabled) OVERRIDE;
546 virtual BrowserAccessibilityManager* GetRootBrowserAccessibilityManager() 545 virtual BrowserAccessibilityManager* GetRootBrowserAccessibilityManager()
547 OVERRIDE; 546 OVERRIDE;
548 virtual BrowserAccessibilityManager* 547 virtual BrowserAccessibilityManager*
549 GetOrCreateRootBrowserAccessibilityManager() OVERRIDE; 548 GetOrCreateRootBrowserAccessibilityManager() OVERRIDE;
550 549
551 // RenderFrameHostManager::Delegate ------------------------------------------ 550 // RenderFrameHostManager::Delegate ------------------------------------------
552 551
553 virtual bool CreateRenderViewForRenderManager( 552 virtual bool CreateRenderViewForRenderManager(
554 RenderViewHost* render_view_host, 553 RenderViewHost* render_view_host,
555 int opener_route_id, 554 int opener_route_id,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 typedef base::Callback<void(WebContents*)> CreatedCallback; 661 typedef base::Callback<void(WebContents*)> CreatedCallback;
663 662
664 // Requests the renderer to select the region between two points in the 663 // Requests the renderer to select the region between two points in the
665 // currently focused frame. 664 // currently focused frame.
666 void SelectRange(const gfx::Point& start, const gfx::Point& end); 665 void SelectRange(const gfx::Point& start, const gfx::Point& end);
667 666
668 // Notifies the main frame that it can continue navigation (if it was deferred 667 // Notifies the main frame that it can continue navigation (if it was deferred
669 // immediately at first response). 668 // immediately at first response).
670 void ResumeResponseDeferredAtStart(); 669 void ResumeResponseDeferredAtStart();
671 670
671 // Forces overscroll to be disabled (used by touch emulation).
672 void SetForceDisableOverscrollContent(bool force_disable);
673
672 private: 674 private:
673 friend class TestNavigationObserver; 675 friend class TestNavigationObserver;
674 friend class WebContentsAddedObserver; 676 friend class WebContentsAddedObserver;
675 friend class WebContentsObserver; 677 friend class WebContentsObserver;
676 friend class WebContents; // To implement factory methods. 678 friend class WebContents; // To implement factory methods.
677 679
678 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials); 680 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials);
679 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle); 681 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle);
680 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FindOpenerRVHWhenPending); 682 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FindOpenerRVHWhenPending);
681 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, 683 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest,
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 bool fullscreen_widget_had_focus_at_shutdown_; 1179 bool fullscreen_widget_had_focus_at_shutdown_;
1178 1180
1179 // Maps the ids of pending image downloads to their callbacks 1181 // Maps the ids of pending image downloads to their callbacks
1180 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; 1182 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap;
1181 ImageDownloadMap image_download_map_; 1183 ImageDownloadMap image_download_map_;
1182 1184
1183 // Whether this WebContents is responsible for displaying a subframe in a 1185 // Whether this WebContents is responsible for displaying a subframe in a
1184 // different process from its parent page. 1186 // different process from its parent page.
1185 bool is_subframe_; 1187 bool is_subframe_;
1186 1188
1187 // Whether touch emulation is enabled in RenderWidgetHost. 1189 // Whether overscroll should be unconditionally disabled.
1188 bool touch_emulation_enabled_; 1190 bool force_disable_overscroll_content_;
1189 1191
1190 // Whether the last JavaScript dialog shown was suppressed. Used for testing. 1192 // Whether the last JavaScript dialog shown was suppressed. Used for testing.
1191 bool last_dialog_suppressed_; 1193 bool last_dialog_suppressed_;
1192 1194
1193 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; 1195 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_;
1194 1196
1195 scoped_ptr<MidiDispatcherHost> midi_dispatcher_host_; 1197 scoped_ptr<MidiDispatcherHost> midi_dispatcher_host_;
1196 1198
1197 scoped_ptr<ScreenOrientationDispatcherHost> 1199 scoped_ptr<ScreenOrientationDispatcherHost>
1198 screen_orientation_dispatcher_host_; 1200 screen_orientation_dispatcher_host_;
1199 1201
1200 // The accessibility mode for all frames. This is queried when each frame 1202 // The accessibility mode for all frames. This is queried when each frame
1201 // is created, and broadcast to all frames when it changes. 1203 // is created, and broadcast to all frames when it changes.
1202 AccessibilityMode accessibility_mode_; 1204 AccessibilityMode accessibility_mode_;
1203 1205
1204 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1206 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1205 }; 1207 };
1206 1208
1207 } // namespace content 1209 } // namespace content
1208 1210
1209 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1211 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698