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

Unified Diff: content/browser/wake_lock/wake_lock_service_context.h

Issue 1345563002: Revert of Wake Lock API implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/wake_lock/wake_lock_service_context.h
diff --git a/content/browser/wake_lock/wake_lock_service_context.h b/content/browser/wake_lock/wake_lock_service_context.h
deleted file mode 100644
index cbef6a4e2559706c172dd5704cffd96c796bad0a..0000000000000000000000000000000000000000
--- a/content/browser/wake_lock/wake_lock_service_context.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
-#define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
-
-#include <set>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "content/browser/wake_lock/wake_lock_service_impl.h"
-#include "content/common/content_export.h"
-#include "content/public/browser/web_contents_observer.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
-
-namespace content {
-
-class PowerSaveBlocker;
-class RenderFrameHost;
-class WebContents;
-
-class CONTENT_EXPORT WakeLockServiceContext: public WebContentsObserver {
- public:
- explicit WakeLockServiceContext(WebContents* web_contents);
- ~WakeLockServiceContext() override;
-
- // Creates a WakeLockServiceImpl that is strongly bound to |request|.
- void CreateService(int frame_id,
- mojo::InterfaceRequest<WakeLockService> request);
-
- // WebContentsObserver implementation.
- void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
-
- // Requests wake lock for |frame_id|.
- void RequestWakeLock(int frame_id);
-
- // Cancels wake lock request for |frame_id|.
- void CancelWakeLock(int frame_id);
-
- // Used by tests.
- bool HasWakeLockForTests() const;
-
- private:
- void CreateWakeLock();
- void RemoveWakeLock();
- void UpdateWakeLock();
-
- // Set of all FrameTreeNode ids currently requesting wake lock.
- std::set<int> frames_requesting_lock_;
-
- // The actual power save blocker for screen.
- scoped_ptr<PowerSaveBlocker> wake_lock_;
-
- base::WeakPtrFactory<WakeLockServiceContext> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
« no previous file with comments | « content/browser/wake_lock/wake_lock_browsertest.cc ('k') | content/browser/wake_lock/wake_lock_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698