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

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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 508
511 // WebWorker ---------------------------------------------------------- 509 // WebWorker ----------------------------------------------------------
512 510
513 virtual void didStartWorkerThread() { } 511 virtual void didStartWorkerThread() { }
514 virtual void willStopWorkerThread() { } 512 virtual void willStopWorkerThread() { }
515 513
516 // WebCrypto ---------------------------------------------------------- 514 // WebCrypto ----------------------------------------------------------
517 515
518 virtual WebCrypto* crypto() { return nullptr; } 516 virtual WebCrypto* crypto() { return nullptr; }
519 517
518 // Mojo ---------------------------------------------------------------
519
520 virtual ServiceRegistry* serviceRegistry() { return nullptr; }
520 521
521 // Platform events ----------------------------------------------------- 522 // Platform events -----------------------------------------------------
522 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. 523 // Device Orientation, Device Motion, Device Light, Battery, Gamepad.
523 524
524 // Connects the mojo handle to the remote service provider.
525 template <typename Interface>
526 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr)
527 {
528 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe());
529 }
530 virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePip eHandle handle) { }
531
532 // Request the platform to start listening to the events of the specified 525 // Request the platform to start listening to the events of the specified
533 // type and notify the given listener (if not null) when there is an update. 526 // type and notify the given listener (if not null) when there is an update.
534 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { } 527 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { }
535 528
536 // Request the platform to stop listening to the specified event and no 529 // Request the platform to stop listening to the specified event and no
537 // longer notify the listener, if any. 530 // longer notify the listener, if any.
538 virtual void stopListening(WebPlatformEventType type) { } 531 virtual void stopListening(WebPlatformEventType type) { }
539 532
540 // This method converts from the supplied DOM code enum to the 533 // This method converts from the supplied DOM code enum to the
541 // embedder's DOM code value for the key pressed. |domCode| values are 534 // embedder's DOM code value for the key pressed. |domCode| values are
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 protected: 612 protected:
620 Platform(); 613 Platform();
621 virtual ~Platform() { } 614 virtual ~Platform() { }
622 615
623 WebThread* m_mainThread; 616 WebThread* m_mainThread;
624 }; 617 };
625 618
626 } // namespace blink 619 } // namespace blink
627 620
628 #endif 621 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698