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

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

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "WebPlatformEventType.h" 48 #include "WebPlatformEventType.h"
49 #include "WebSize.h" 49 #include "WebSize.h"
50 #include "WebSpeechSynthesizer.h" 50 #include "WebSpeechSynthesizer.h"
51 #include "WebStorageQuotaCallbacks.h" 51 #include "WebStorageQuotaCallbacks.h"
52 #include "WebStorageQuotaType.h" 52 #include "WebStorageQuotaType.h"
53 #include "WebString.h" 53 #include "WebString.h"
54 #include "WebURLError.h" 54 #include "WebURLError.h"
55 #include "WebVector.h" 55 #include "WebVector.h"
56 #include "base/metrics/user_metrics_action.h" 56 #include "base/metrics/user_metrics_action.h"
57 57
58 #include "mojo/public/cpp/bindings/interface_request.h"
59 #include "mojo/public/cpp/system/core.h"
60
61 class GrContext; 58 class GrContext;
62 59
63 namespace blink { 60 namespace blink {
64 61
62 class ServiceRegistry;
65 class WebAudioBus; 63 class WebAudioBus;
66 class WebBlobRegistry; 64 class WebBlobRegistry;
67 class WebCanvasCaptureHandler; 65 class WebCanvasCaptureHandler;
68 class WebClipboard; 66 class WebClipboard;
69 class WebCompositorSupport; 67 class WebCompositorSupport;
70 class WebCookieJar; 68 class WebCookieJar;
71 class WebCrypto; 69 class WebCrypto;
72 class WebDatabaseObserver; 70 class WebDatabaseObserver;
73 class WebPlatformEventListener; 71 class WebPlatformEventListener;
74 class WebFallbackThemeEngine; 72 class WebFallbackThemeEngine;
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 522
525 // WebWorker ---------------------------------------------------------- 523 // WebWorker ----------------------------------------------------------
526 524
527 virtual void didStartWorkerThread() { } 525 virtual void didStartWorkerThread() { }
528 virtual void willStopWorkerThread() { } 526 virtual void willStopWorkerThread() { }
529 527
530 // WebCrypto ---------------------------------------------------------- 528 // WebCrypto ----------------------------------------------------------
531 529
532 virtual WebCrypto* crypto() { return nullptr; } 530 virtual WebCrypto* crypto() { return nullptr; }
533 531
532 // Mojo ---------------------------------------------------------------
533
534 virtual ServiceRegistry* serviceRegistry() { return nullptr; }
534 535
535 // Platform events ----------------------------------------------------- 536 // Platform events -----------------------------------------------------
536 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. 537 // Device Orientation, Device Motion, Device Light, Battery, Gamepad.
537 538
538 // Connects the mojo handle to the remote service provider.
539 template <typename Interface>
540 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr)
541 {
542 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe());
543 }
544 virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePip eHandle handle) { }
545
546 // Request the platform to start listening to the events of the specified 539 // Request the platform to start listening to the events of the specified
547 // type and notify the given listener (if not null) when there is an update. 540 // type and notify the given listener (if not null) when there is an update.
548 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { } 541 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { }
549 542
550 // Request the platform to stop listening to the specified event and no 543 // Request the platform to stop listening to the specified event and no
551 // longer notify the listener, if any. 544 // longer notify the listener, if any.
552 virtual void stopListening(WebPlatformEventType type) { } 545 virtual void stopListening(WebPlatformEventType type) { }
553 546
554 // This method converts from the supplied DOM code enum to the 547 // This method converts from the supplied DOM code enum to the
555 // embedder's DOM code value for the key pressed. |domCode| values are 548 // embedder's DOM code value for the key pressed. |domCode| values are
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 protected: 626 protected:
634 Platform(); 627 Platform();
635 virtual ~Platform() { } 628 virtual ~Platform() { }
636 629
637 WebThread* m_mainThread; 630 WebThread* m_mainThread;
638 }; 631 };
639 632
640 } // namespace blink 633 } // namespace blink
641 634
642 #endif 635 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698