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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 898443003: Use RWH instead of RWHV to know whether a frame is focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years, 10 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 #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
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 frame is currently focused.
232 bool is_focused() const { return is_focused_; }
233
231 // Called to notify the RenderWidget that it has lost the mouse lock. 234 // Called to notify the RenderWidget that it has lost the mouse lock.
232 virtual void LostMouseLock(); 235 virtual void LostMouseLock();
233 236
234 // Noifies the RenderWidget of the current mouse cursor visibility state. 237 // Noifies the RenderWidget of the current mouse cursor visibility state.
235 void SendCursorVisibilityState(bool is_visible); 238 void SendCursorVisibilityState(bool is_visible);
236 239
237 // Notifies the RenderWidgetHost that the View was destroyed. 240 // Notifies the RenderWidgetHost that the View was destroyed.
238 void ViewDestroyed(); 241 void ViewDestroyed();
239 242
240 #if defined(OS_MACOSX) 243 #if defined(OS_MACOSX)
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 837
835 int next_browser_snapshot_id_; 838 int next_browser_snapshot_id_;
836 typedef std::map<int, 839 typedef std::map<int,
837 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; 840 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
838 PendingSnapshotMap pending_browser_snapshots_; 841 PendingSnapshotMap pending_browser_snapshots_;
839 842
840 // Indicates whether a RenderFramehost has ownership, in which case this 843 // Indicates whether a RenderFramehost has ownership, in which case this
841 // object does not self destroy. 844 // object does not self destroy.
842 bool owned_by_render_frame_host_; 845 bool owned_by_render_frame_host_;
843 846
847 // Indicates whether this frame is focused. This is trying to match what the
848 // renderer process knows. It is different from RenderWidgetHostView::HasFocus
849 // in that regard.
Charlie Reis 2015/02/02 18:34:49 Please be more specific here: when is different fr
850 bool is_focused_;
851
844 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 852 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
845 853
846 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 854 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
847 }; 855 };
848 856
849 } // namespace content 857 } // namespace content
850 858
851 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 859 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698