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

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

Issue 1538803002: Migrates battery_status from content/renderer/ to WebKit/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for code review Created 4 years, 10 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 /* 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 "WebBatteryStatusListener.h"
40 #include "WebCommon.h" 39 #include "WebCommon.h"
41 #include "WebData.h" 40 #include "WebData.h"
42 #include "WebDeviceLightListener.h" 41 #include "WebDeviceLightListener.h"
43 #include "WebGamepadListener.h" 42 #include "WebGamepadListener.h"
44 #include "WebGamepads.h" 43 #include "WebGamepads.h"
45 #include "WebGestureDevice.h" 44 #include "WebGestureDevice.h"
46 #include "WebGraphicsContext3D.h" 45 #include "WebGraphicsContext3D.h"
47 #include "WebLocalizedString.h" 46 #include "WebLocalizedString.h"
48 #include "WebPlatformEventType.h" 47 #include "WebPlatformEventType.h"
49 #include "WebSize.h" 48 #include "WebSize.h"
50 #include "WebSpeechSynthesizer.h" 49 #include "WebSpeechSynthesizer.h"
51 #include "WebStorageQuotaCallbacks.h" 50 #include "WebStorageQuotaCallbacks.h"
52 #include "WebStorageQuotaType.h" 51 #include "WebStorageQuotaType.h"
53 #include "WebString.h" 52 #include "WebString.h"
54 #include "WebURLError.h" 53 #include "WebURLError.h"
55 #include "WebVector.h" 54 #include "WebVector.h"
56 #include "WebWaitableEvent.h" 55 #include "WebWaitableEvent.h"
57 56
57 #include "mojo/public/cpp/bindings/interface_ptr.h"
58 #include "mojo/public/cpp/bindings/interface_request.h"
59 #include "mojo/public/cpp/system/core.h"
60
58 class GrContext; 61 class GrContext;
59 62
60 namespace blink { 63 namespace blink {
61 64
62 class WebAudioBus; 65 class WebAudioBus;
63 class WebBlobRegistry; 66 class WebBlobRegistry;
64 class WebCanvasCaptureHandler; 67 class WebCanvasCaptureHandler;
65 class WebClipboard; 68 class WebClipboard;
66 class WebCompositorSupport; 69 class WebCompositorSupport;
67 class WebCookieJar; 70 class WebCookieJar;
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 virtual void willStopWorkerThread() { } 527 virtual void willStopWorkerThread() { }
525 528
526 // WebCrypto ---------------------------------------------------------- 529 // WebCrypto ----------------------------------------------------------
527 530
528 virtual WebCrypto* crypto() { return nullptr; } 531 virtual WebCrypto* crypto() { return nullptr; }
529 532
530 533
531 // Platform events ----------------------------------------------------- 534 // Platform events -----------------------------------------------------
532 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. 535 // Device Orientation, Device Motion, Device Light, Battery, Gamepad.
533 536
537 // Connects the mojo handle to the remote service provider.
538 template<typename Interface>
539 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr)
540 {
541 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe());
542 }
543 virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePip eHandle handle) { }
544
534 // Request the platform to start listening to the events of the specified 545 // Request the platform to start listening to the events of the specified
535 // type and notify the given listener (if not null) when there is an update. 546 // type and notify the given listener (if not null) when there is an update.
536 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { } 547 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { }
537 548
538 // Request the platform to stop listening to the specified event and no 549 // Request the platform to stop listening to the specified event and no
539 // longer notify the listener, if any. 550 // longer notify the listener, if any.
540 virtual void stopListening(WebPlatformEventType type) { } 551 virtual void stopListening(WebPlatformEventType type) { }
541 552
542 // This method converts from the supplied DOM code enum to the 553 // This method converts from the supplied DOM code enum to the
543 // embedder's DOM code value for the key pressed. |domCode| values are 554 // embedder's DOM code value for the key pressed. |domCode| values are
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 protected: 632 protected:
622 BLINK_PLATFORM_EXPORT Platform(); 633 BLINK_PLATFORM_EXPORT Platform();
623 virtual ~Platform() { } 634 virtual ~Platform() { }
624 635
625 WebThread* m_mainThread; 636 WebThread* m_mainThread;
626 }; 637 };
627 638
628 } // namespace blink 639 } // namespace blink
629 640
630 #endif 641 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698