| 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_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 virtual void WasShown(const ui::LatencyInfo& latency_info); | 221 virtual void WasShown(const ui::LatencyInfo& latency_info); |
| 222 | 222 |
| 223 // Returns true if the RenderWidget is hidden. | 223 // Returns true if the RenderWidget is hidden. |
| 224 bool is_hidden() const { return is_hidden_; } | 224 bool is_hidden() const { return is_hidden_; } |
| 225 | 225 |
| 226 // Called to notify the RenderWidget that its associated native window | 226 // Called to notify the RenderWidget that its associated native window |
| 227 // got/lost focused. | 227 // got/lost focused. |
| 228 virtual void GotFocus(); | 228 virtual void GotFocus(); |
| 229 virtual void LostCapture(); | 229 virtual void LostCapture(); |
| 230 | 230 |
| 231 // Indicates whether the RenderWidgetHost thinks it is focused. |
| 232 // This is different from RenderWidgetHostView::HasFocus() in the sense that |
| 233 // it reflects what the renderer process knows: it saves the state that is |
| 234 // sent/received. |
| 235 // RenderWidgetHostView::HasFocus() is checking whether the view is focused so |
| 236 // it is possible in some edge cases that a view was requested to be focused |
| 237 // but it failed, thus HasFocus() returns false. |
| 238 bool is_focused() const { return is_focused_; } |
| 239 |
| 231 // Called to notify the RenderWidget that it has lost the mouse lock. | 240 // Called to notify the RenderWidget that it has lost the mouse lock. |
| 232 virtual void LostMouseLock(); | 241 virtual void LostMouseLock(); |
| 233 | 242 |
| 234 // Noifies the RenderWidget of the current mouse cursor visibility state. | 243 // Noifies the RenderWidget of the current mouse cursor visibility state. |
| 235 void SendCursorVisibilityState(bool is_visible); | 244 void SendCursorVisibilityState(bool is_visible); |
| 236 | 245 |
| 237 // Notifies the RenderWidgetHost that the View was destroyed. | 246 // Notifies the RenderWidgetHost that the View was destroyed. |
| 238 void ViewDestroyed(); | 247 void ViewDestroyed(); |
| 239 | 248 |
| 240 #if defined(OS_MACOSX) | 249 #if defined(OS_MACOSX) |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 | 843 |
| 835 int next_browser_snapshot_id_; | 844 int next_browser_snapshot_id_; |
| 836 typedef std::map<int, | 845 typedef std::map<int, |
| 837 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 846 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
| 838 PendingSnapshotMap pending_browser_snapshots_; | 847 PendingSnapshotMap pending_browser_snapshots_; |
| 839 | 848 |
| 840 // Indicates whether a RenderFramehost has ownership, in which case this | 849 // Indicates whether a RenderFramehost has ownership, in which case this |
| 841 // object does not self destroy. | 850 // object does not self destroy. |
| 842 bool owned_by_render_frame_host_; | 851 bool owned_by_render_frame_host_; |
| 843 | 852 |
| 853 // Indicates whether this RenderWidgetHost thinks is focused. This is trying |
| 854 // to match what the renderer process knows. It is different from |
| 855 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, |
| 856 // causing HasFocus to return false when is_focused_ is true. |
| 857 bool is_focused_; |
| 858 |
| 844 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 859 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 845 | 860 |
| 846 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 861 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 847 }; | 862 }; |
| 848 | 863 |
| 849 } // namespace content | 864 } // namespace content |
| 850 | 865 |
| 851 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 866 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |