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

Unified Diff: content/browser/web_contents/web_contents_impl.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 6abe7e27ed24870321e4a6b07bc747d06aa3035d..895b59bc3629e0ec46523c497c7a5c3340b6f6fd 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -41,6 +41,7 @@
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/resource_type.h"
#include "content/public/common/three_d_api_types.h"
+#include "device/wake_lock/public/interfaces/wake_lock_service_context.mojom.h"
#include "net/base/load_states.h"
#include "net/http/http_response_headers.h"
#include "ppapi/features/features.h"
@@ -76,7 +77,6 @@ class ScreenOrientationProvider;
class SiteInstance;
class TestWebContents;
class TextInputManager;
-class WakeLockServiceContext;
class WebContentsAudioMuter;
class WebContentsBindingSet;
class WebContentsDelegate;
@@ -262,6 +262,7 @@ class CONTENT_EXPORT WebContentsImpl
WebContentsBindingSet* binding_set);
// WebContents ------------------------------------------------------
+ int GetId() override;
WebContentsDelegate* GetDelegate() override;
void SetDelegate(WebContentsDelegate* delegate) override;
NavigationControllerImpl& GetController() override;
@@ -481,8 +482,9 @@ class CONTENT_EXPORT WebContentsImpl
RenderFrameHost* GetGuestByInstanceID(
RenderFrameHost* render_frame_host,
int browser_plugin_instance_id) override;
+ static gfx::NativeView GetNativeViewForWebContents(int web_contents_id);
device::GeolocationServiceContext* GetGeolocationServiceContext() override;
- device::WakeLockServiceContext* GetWakeLockServiceContext() override;
+ device::mojom::WakeLockServiceContext* GetWakeLockServiceContext() override;
void EnterFullscreenMode(const GURL& origin) override;
void ExitFullscreenMode(bool will_cause_resize) override;
bool ShouldRouteMessageEvent(
@@ -1188,6 +1190,9 @@ class CONTENT_EXPORT WebContentsImpl
// Data for core operation ---------------------------------------------------
+ // This instance's ID.
+ int id_;
+
// Delegate for notifying our owner about stuff. Not owned by us.
WebContentsDelegate* delegate_;
@@ -1456,7 +1461,7 @@ class CONTENT_EXPORT WebContentsImpl
std::unique_ptr<device::GeolocationServiceContext>
geolocation_service_context_;
- std::unique_ptr<device::WakeLockServiceContext> wake_lock_service_context_;
+ device::mojom::WakeLockServiceContextPtr wake_lock_service_context_;
std::unique_ptr<ScreenOrientationProvider> screen_orientation_provider_;

Powered by Google App Engine
This is Rietveld 408576698