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