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

Side by Side Diff: content/renderer/render_widget.h

Issue 298283003: Add WasShown/WasHidden to RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add basic test on browser side. Created 6 years, 6 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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 ui::MenuSourceType context_menu_source_type() { 106 ui::MenuSourceType context_menu_source_type() {
107 return context_menu_source_type_; } 107 return context_menu_source_type_; }
108 gfx::Point touch_editing_context_menu_location() { 108 gfx::Point touch_editing_context_menu_location() {
109 return touch_editing_context_menu_location_; 109 return touch_editing_context_menu_location_;
110 } 110 }
111 111
112 // Functions to track out-of-process frames for special notifications. 112 // Functions to track out-of-process frames for special notifications.
113 void RegisterSwappedOutChildFrame(RenderFrameImpl* frame); 113 void RegisterSwappedOutChildFrame(RenderFrameImpl* frame);
114 void UnregisterSwappedOutChildFrame(RenderFrameImpl* frame); 114 void UnregisterSwappedOutChildFrame(RenderFrameImpl* frame);
115 115
116 // Functions to track all RenderFrame objects associated with this
117 // RenderWidget.
118 void RegisterRenderFrame(RenderFrameImpl* frame);
119 void UnregisterRenderFrame(RenderFrameImpl* frame);
120
116 // IPC::Listener 121 // IPC::Listener
117 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 122 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
118 123
119 // IPC::Sender 124 // IPC::Sender
120 virtual bool Send(IPC::Message* msg) OVERRIDE; 125 virtual bool Send(IPC::Message* msg) OVERRIDE;
121 126
122 // blink::WebWidgetClient 127 // blink::WebWidgetClient
123 virtual void suppressCompositorScheduling(bool enable); 128 virtual void suppressCompositorScheduling(bool enable);
124 virtual void willBeginCompositorFrame(); 129 virtual void willBeginCompositorFrame();
125 virtual void didAutoResize(const blink::WebSize& new_size); 130 virtual void didAutoResize(const blink::WebSize& new_size);
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 gfx::Point popup_view_origin_for_emulation_; 710 gfx::Point popup_view_origin_for_emulation_;
706 gfx::Point popup_screen_origin_for_emulation_; 711 gfx::Point popup_screen_origin_for_emulation_;
707 float popup_origin_scale_for_emulation_; 712 float popup_origin_scale_for_emulation_;
708 713
709 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; 714 scoped_ptr<ResizingModeSelector> resizing_mode_selector_;
710 715
711 // A list of swapped out RenderFrames that need to be notified 716 // A list of swapped out RenderFrames that need to be notified
712 // of compositing-related events (e.g. DidCommitCompositorFrame). 717 // of compositing-related events (e.g. DidCommitCompositorFrame).
713 ObserverList<RenderFrameImpl> swapped_out_frames_; 718 ObserverList<RenderFrameImpl> swapped_out_frames_;
714 719
720 // A list of RenderFrames associated with this RenderWidget. Notifications
721 // are sent to each frame in the list for events such as changing
722 // visibility state for example.
723 ObserverList<RenderFrameImpl> render_frames_;
724
715 ui::MenuSourceType context_menu_source_type_; 725 ui::MenuSourceType context_menu_source_type_;
716 gfx::Point touch_editing_context_menu_location_; 726 gfx::Point touch_editing_context_menu_location_;
717 727
718 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 728 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
719 }; 729 };
720 730
721 } // namespace content 731 } // namespace content
722 732
723 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 733 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698