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

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

Issue 1359163005: Remove surface_id from RenderWidget/RenderWidgetHost and friends (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@channel_creation_preempt
Patch Set: fix more tests Created 5 years, 2 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 public TouchEmulatorClient, 88 public TouchEmulatorClient,
89 public IPC::Listener { 89 public IPC::Listener {
90 public: 90 public:
91 // routing_id can be MSG_ROUTING_NONE, in which case the next available 91 // routing_id can be MSG_ROUTING_NONE, in which case the next available
92 // routing id is taken from the RenderProcessHost. 92 // routing id is taken from the RenderProcessHost.
93 // If this object outlives |delegate|, DetachDelegate() must be called when 93 // If this object outlives |delegate|, DetachDelegate() must be called when
94 // |delegate| goes away. 94 // |delegate| goes away.
95 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, 95 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
96 RenderProcessHost* process, 96 RenderProcessHost* process,
97 int32_t routing_id, 97 int32_t routing_id,
98 int32_t surface_id,
99 bool hidden); 98 bool hidden);
100 ~RenderWidgetHostImpl() override; 99 ~RenderWidgetHostImpl() override;
101 100
102 // Similar to RenderWidgetHost::FromID, but returning the Impl object. 101 // Similar to RenderWidgetHost::FromID, but returning the Impl object.
103 static RenderWidgetHostImpl* FromID(int32_t process_id, int32_t routing_id); 102 static RenderWidgetHostImpl* FromID(int32_t process_id, int32_t routing_id);
104 103
105 // Returns all RenderWidgetHosts including swapped out ones for 104 // Returns all RenderWidgetHosts including swapped out ones for
106 // internal use. The public interface 105 // internal use. The public interface
107 // RendgerWidgetHost::GetRenderWidgetHosts only returns active ones. 106 // RendgerWidgetHost::GetRenderWidgetHosts only returns active ones.
108 static scoped_ptr<RenderWidgetHostIterator> GetAllRenderWidgetHosts(); 107 static scoped_ptr<RenderWidgetHostIterator> GetAllRenderWidgetHosts();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 base::Callback<void(const unsigned char*, size_t)>; 164 base::Callback<void(const unsigned char*, size_t)>;
166 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); 165 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback);
167 166
168 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; 167 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
169 168
170 // Sets the View of this RenderWidgetHost. 169 // Sets the View of this RenderWidgetHost.
171 void SetView(RenderWidgetHostViewBase* view); 170 void SetView(RenderWidgetHostViewBase* view);
172 171
173 RenderWidgetHostDelegate* delegate() const { return delegate_; } 172 RenderWidgetHostDelegate* delegate() const { return delegate_; }
174 173
175 int surface_id() const { return surface_id_; }
176
177 bool empty() const { return current_size_.IsEmpty(); } 174 bool empty() const { return current_size_.IsEmpty(); }
178 175
179 // Called when a renderer object already been created for this host, and we 176 // Called when a renderer object already been created for this host, and we
180 // just need to be attached to it. Used for window.open, <select> dropdown 177 // just need to be attached to it. Used for window.open, <select> dropdown
181 // menus, and other times when the renderer initiates creating an object. 178 // menus, and other times when the renderer initiates creating an object.
182 virtual void Init(); 179 virtual void Init();
183 180
184 // Initializes a RenderWidgetHost that is attached to a RenderFrameHost. 181 // Initializes a RenderWidgetHost that is attached to a RenderFrameHost.
185 void InitForFrame(); 182 void InitForFrame();
186 183
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 // It will remain non-NULL until DetachDelegate() is called. 688 // It will remain non-NULL until DetachDelegate() is called.
692 RenderWidgetHostDelegate* delegate_; 689 RenderWidgetHostDelegate* delegate_;
693 690
694 // Created during construction and guaranteed never to be NULL, but its 691 // Created during construction and guaranteed never to be NULL, but its
695 // channel may be NULL if the renderer crashed, so one must always check that. 692 // channel may be NULL if the renderer crashed, so one must always check that.
696 RenderProcessHost* const process_; 693 RenderProcessHost* const process_;
697 694
698 // The ID of the corresponding object in the Renderer Instance. 695 // The ID of the corresponding object in the Renderer Instance.
699 const int routing_id_; 696 const int routing_id_;
700 697
701 // The ID of the surface corresponding to this render widget.
702 int surface_id_;
703
704 // Indicates whether a page is loading or not. 698 // Indicates whether a page is loading or not.
705 bool is_loading_; 699 bool is_loading_;
706 700
707 // Indicates whether a page is hidden or not. It has to stay in sync with the 701 // Indicates whether a page is hidden or not. It has to stay in sync with the
708 // most recent call to process_->WidgetRestored() / WidgetHidden(). 702 // most recent call to process_->WidgetRestored() / WidgetHidden().
709 bool is_hidden_; 703 bool is_hidden_;
710 704
711 // Set if we are waiting for a repaint ack for the view. 705 // Set if we are waiting for a repaint ack for the view.
712 bool repaint_ack_pending_; 706 bool repaint_ack_pending_;
713 707
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 bool is_focused_; 828 bool is_focused_;
835 829
836 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 830 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
837 831
838 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 832 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
839 }; 833 };
840 834
841 } // namespace content 835 } // namespace content
842 836
843 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 837 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.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