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

Side by Side Diff: chrome/browser/devtools/devtools_power_profiler_host.h

Issue 106223002: chrome power profiler chrome side changes (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_POWER_PROFILER_HOST_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_POWER_PROFILER_HOST_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/values.h"
12 #include "chrome/browser/devtools/devtools_window.h"
13 #include "content/public/browser/power_profiler_observer.h"
14
15 class DevToolsWindow;
16
17 // A class used to monitor the power usage and tell profiler the power data
18 class DevToolsPowerProfilerHost : public content::PowerProfilerObserver {
19 public:
20 explicit DevToolsPowerProfilerHost(const base::WeakPtr<DevToolsWindow>&);
21 ~DevToolsPowerProfilerHost() {}
22 virtual void Send(content::PowerEvent*) OVERRIDE;
23
24 private:
25 void SendWrapper(const std::string& message);
26 base::Time convertMonotonicTimeToWallTime(base::TimeTicks&);
27 void convertPowerValueToJSONObject(base::DictionaryValue*,
28 content::PowerEvent*);
29 base::WeakPtr<DevToolsWindow> frontend_host_;
30 DISALLOW_COPY_AND_ASSIGN(DevToolsPowerProfilerHost);
31 };
32
33 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_POWER_PROFILER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698