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

Side by Side Diff: public/platform/Platform.h

Issue 246773007: Add setBatteryListener into Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « Source/modules/battery/BatteryDispatcher.cpp ('k') | public/platform/WebBatteryStatus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #ifndef Platform_h 31 #ifndef Platform_h
32 #define Platform_h 32 #define Platform_h
33 33
34 #ifdef WIN32 34 #ifdef WIN32
35 #include <windows.h> 35 #include <windows.h>
36 #endif 36 #endif
37 37
38 #include "WebAudioDevice.h" 38 #include "WebAudioDevice.h"
39 #include "WebBatteryListener.h"
timvolodine 2014/04/23 17:32:37 no need for include if you are forward-declaring i
39 #include "WebCommon.h" 40 #include "WebCommon.h"
40 #include "WebData.h" 41 #include "WebData.h"
41 #include "WebGamepadListener.h" 42 #include "WebGamepadListener.h"
42 #include "WebGamepads.h" 43 #include "WebGamepads.h"
43 #include "WebGraphicsContext3D.h" 44 #include "WebGraphicsContext3D.h"
44 #include "WebLocalizedString.h" 45 #include "WebLocalizedString.h"
45 #include "WebScreenOrientationLockType.h" 46 #include "WebScreenOrientationLockType.h"
46 #include "WebSpeechSynthesizer.h" 47 #include "WebSpeechSynthesizer.h"
47 #include "WebStorageQuotaCallbacks.h" 48 #include "WebStorageQuotaCallbacks.h"
48 #include "WebStorageQuotaType.h" 49 #include "WebStorageQuotaType.h"
49 #include "WebString.h" 50 #include "WebString.h"
50 #include "WebURLError.h" 51 #include "WebURLError.h"
51 #include "WebVector.h" 52 #include "WebVector.h"
52 53
53 class GrContext; 54 class GrContext;
54 55
55 namespace blink { 56 namespace blink {
56 57
57 class WebAudioBus; 58 class WebAudioBus;
59 class WebBatteryListener;
timvolodine 2014/04/23 17:32:37 could we rename this to WebBatteryStatusListener?
58 class WebBlobRegistry; 60 class WebBlobRegistry;
59 class WebContentDecryptionModule; 61 class WebContentDecryptionModule;
60 class WebClipboard; 62 class WebClipboard;
61 class WebCompositorSupport; 63 class WebCompositorSupport;
62 class WebConvertableToTraceFormat; 64 class WebConvertableToTraceFormat;
63 class WebCookieJar; 65 class WebCookieJar;
64 class WebCrypto; 66 class WebCrypto;
65 class WebDatabaseObserver; 67 class WebDatabaseObserver;
66 class WebDeviceMotionListener; 68 class WebDeviceMotionListener;
67 class WebDeviceOrientationListener; 69 class WebDeviceOrientationListener;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Pass in (numberOfInputChannels > 0) if live/local audio input is desired. 154 // Pass in (numberOfInputChannels > 0) if live/local audio input is desired.
153 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*, const WebString& deviceId) { return 0; } 155 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*, const WebString& deviceId) { return 0; }
154 156
155 157
156 // MIDI ---------------------------------------------------------------- 158 // MIDI ----------------------------------------------------------------
157 159
158 // Creates a platform dependent WebMIDIAccessor. MIDIAccessor under platform 160 // Creates a platform dependent WebMIDIAccessor. MIDIAccessor under platform
159 // creates and owns it. 161 // creates and owns it.
160 virtual WebMIDIAccessor* createMIDIAccessor(WebMIDIAccessorClient*) { return 0; } 162 virtual WebMIDIAccessor* createMIDIAccessor(WebMIDIAccessorClient*) { return 0; }
161 163
164 // Battery -----------------------------------------------------------------
timvolodine 2014/04/23 17:32:37 seems that other lines have length 72.. don't know
165
166 // Sets the listener for watching battery status updates.
167 virtual void setBatteryListener(blink::WebBatteryListener*) { }
timvolodine 2014/04/23 17:32:37 can we rename the method to setBatteryStatusListen
162 168
163 // Blob ---------------------------------------------------------------- 169 // Blob ----------------------------------------------------------------
164 170
165 // Must return non-null. 171 // Must return non-null.
166 virtual WebBlobRegistry* blobRegistry() { return 0; } 172 virtual WebBlobRegistry* blobRegistry() { return 0; }
167 173
168 174
169 // Database ------------------------------------------------------------ 175 // Database ------------------------------------------------------------
170 176
171 // Opens a database file; dirHandle should be 0 if the caller does not need 177 // Opens a database file; dirHandle should be 0 if the caller does not need
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 virtual WebDatabaseObserver* databaseObserver() { return 0; } 648 virtual WebDatabaseObserver* databaseObserver() { return 0; }
643 649
644 650
645 protected: 651 protected:
646 virtual ~Platform() { } 652 virtual ~Platform() { }
647 }; 653 };
648 654
649 } // namespace blink 655 } // namespace blink
650 656
651 #endif 657 #endif
OLDNEW
« no previous file with comments | « Source/modules/battery/BatteryDispatcher.cpp ('k') | public/platform/WebBatteryStatus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698