OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
461 // RenderViewHostDelegate). The gestures that count are 1) any mouse down | 461 // RenderViewHostDelegate). The gestures that count are 1) any mouse down |
462 // event and 2) enter or space key presses. | 462 // event and 2) enter or space key presses. |
463 virtual void OnUserGesture() {} | 463 virtual void OnUserGesture() {} |
464 | 464 |
465 // Callbacks for notification when the renderer becomes unresponsive to user | 465 // Callbacks for notification when the renderer becomes unresponsive to user |
466 // input events, and subsequently responsive again. RenderViewHost overrides | 466 // input events, and subsequently responsive again. RenderViewHost overrides |
467 // these to tell its delegate to show the user a warning. | 467 // these to tell its delegate to show the user a warning. |
468 virtual void NotifyRendererUnresponsive() {} | 468 virtual void NotifyRendererUnresponsive() {} |
469 virtual void NotifyRendererResponsive() {} | 469 virtual void NotifyRendererResponsive() {} |
470 | 470 |
471 // RenderViewhost overrides this method to check whether it is allowed to lock | |
472 // the mouse. | |
473 virtual bool HasMouseLockPermission() const; | |
sky
2011/09/28 22:58:04
Add a real description. Also, what about CanLockMo
yzshen1
2011/09/29 20:41:04
Done.
| |
474 | |
475 void UnlockMouseIfNecessary(); | |
471 bool IsMouseLocked() const; | 476 bool IsMouseLocked() const; |
472 | 477 |
473 protected: | 478 protected: |
474 // true if a renderer has once been valid. We use this flag to display a sad | 479 // true if a renderer has once been valid. We use this flag to display a sad |
475 // tab only when we lose our renderer and not if a paint occurs during | 480 // tab only when we lose our renderer and not if a paint occurs during |
476 // initialization. | 481 // initialization. |
477 bool renderer_initialized_; | 482 bool renderer_initialized_; |
478 | 483 |
479 private: | 484 private: |
480 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, Resize); | 485 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, Resize); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 | 732 |
728 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; | 733 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; |
729 | 734 |
730 // The last scroll offset of the render widget. | 735 // The last scroll offset of the render widget. |
731 gfx::Point last_scroll_offset_; | 736 gfx::Point last_scroll_offset_; |
732 | 737 |
733 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 738 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
734 }; | 739 }; |
735 | 740 |
736 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 741 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
OLD | NEW |