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

Side by Side Diff: content/public/browser/web_contents.h

Issue 2734943003: Device Service: Decouple Wake Lock from //content (Closed)
Patch Set: Bugfix Created 3 years, 9 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 CONTENT_EXPORT static WebContents* CreateWithSessionStorage( 181 CONTENT_EXPORT static WebContents* CreateWithSessionStorage(
182 const CreateParams& params, 182 const CreateParams& params,
183 const SessionStorageNamespaceMap& session_storage_namespace_map); 183 const SessionStorageNamespaceMap& session_storage_namespace_map);
184 184
185 // Returns the WebContents that owns the RenderViewHost, or nullptr if the 185 // Returns the WebContents that owns the RenderViewHost, or nullptr if the
186 // render view host's delegate isn't a WebContents. 186 // render view host's delegate isn't a WebContents.
187 CONTENT_EXPORT static WebContents* FromRenderViewHost(RenderViewHost* rvh); 187 CONTENT_EXPORT static WebContents* FromRenderViewHost(RenderViewHost* rvh);
188 188
189 CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh); 189 CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh);
190 190
191 // Returns the WebContents associated with |id|.
192 CONTENT_EXPORT static WebContents* FromId(int id);
blundell 2017/03/07 20:41:15 If we stick with this approach, I'll modify this t
193
191 // Returns the WebContents associated with the |frame_tree_node_id|. 194 // Returns the WebContents associated with the |frame_tree_node_id|.
192 CONTENT_EXPORT static WebContents* FromFrameTreeNodeId( 195 CONTENT_EXPORT static WebContents* FromFrameTreeNodeId(
193 int frame_tree_node_id); 196 int frame_tree_node_id);
194 197
195 // Sets delegate for platform specific screen orientation functionality. 198 // Sets delegate for platform specific screen orientation functionality.
196 CONTENT_EXPORT static void SetScreenOrientationDelegate( 199 CONTENT_EXPORT static void SetScreenOrientationDelegate(
197 ScreenOrientationDelegate* delegate); 200 ScreenOrientationDelegate* delegate);
198 201
199 ~WebContents() override {} 202 ~WebContents() override {}
200 203
201 // Intrinsic tab state ------------------------------------------------------- 204 // Intrinsic tab state -------------------------------------------------------
202 205
206 // Gets the globally-unique ID associated with this WebContents.
207 virtual int GetId() = 0;
208
203 // Gets/Sets the delegate. 209 // Gets/Sets the delegate.
204 virtual WebContentsDelegate* GetDelegate() = 0; 210 virtual WebContentsDelegate* GetDelegate() = 0;
205 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; 211 virtual void SetDelegate(WebContentsDelegate* delegate) = 0;
206 212
207 // Gets the controller for this WebContents. 213 // Gets the controller for this WebContents.
208 virtual NavigationController& GetController() = 0; 214 virtual NavigationController& GetController() = 0;
209 virtual const NavigationController& GetController() const = 0; 215 virtual const NavigationController& GetController() const = 0;
210 216
211 // Returns the user browser context associated with this WebContents (via the 217 // Returns the user browser context associated with this WebContents (via the
212 // NavigationController). 218 // NavigationController).
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 793
788 private: 794 private:
789 // This interface should only be implemented inside content. 795 // This interface should only be implemented inside content.
790 friend class WebContentsImpl; 796 friend class WebContentsImpl;
791 WebContents() {} 797 WebContents() {}
792 }; 798 };
793 799
794 } // namespace content 800 } // namespace content
795 801
796 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 802 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698