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

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

Issue 2643063002: Refactor Blink's ServiceConnector and add ability to mock in layout tests (Closed)
Patch Set: Rebase Created 3 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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 namespace v8 { 65 namespace v8 {
66 class Context; 66 class Context;
67 template <class T> 67 template <class T>
68 class Local; 68 class Local;
69 } 69 }
70 70
71 namespace blink { 71 namespace blink {
72 72
73 class Connector;
73 class InterfaceProvider; 74 class InterfaceProvider;
74 class WebAudioBus; 75 class WebAudioBus;
75 class WebBlobRegistry; 76 class WebBlobRegistry;
76 class WebCanvasCaptureHandler; 77 class WebCanvasCaptureHandler;
77 class WebClipboard; 78 class WebClipboard;
78 class WebCompositorSupport; 79 class WebCompositorSupport;
79 class WebCookieJar; 80 class WebCookieJar;
80 class WebCrypto; 81 class WebCrypto;
81 class WebDatabaseObserver; 82 class WebDatabaseObserver;
82 class WebPlatformEventListener; 83 class WebPlatformEventListener;
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 virtual bool allowScriptExtensionForServiceWorker(const WebURL& scriptUrl) { 584 virtual bool allowScriptExtensionForServiceWorker(const WebURL& scriptUrl) {
584 return false; 585 return false;
585 } 586 }
586 587
587 // WebCrypto ---------------------------------------------------------- 588 // WebCrypto ----------------------------------------------------------
588 589
589 virtual WebCrypto* crypto() { return nullptr; } 590 virtual WebCrypto* crypto() { return nullptr; }
590 591
591 // Mojo --------------------------------------------------------------- 592 // Mojo ---------------------------------------------------------------
592 593
594 virtual Connector* connector();
595
593 virtual InterfaceProvider* interfaceProvider(); 596 virtual InterfaceProvider* interfaceProvider();
594 597
595 // Sets up a connection to the ServiceManager by binding |remoteHandle| to a
596 // remote implementation of
597 // //service_manager/public/interfaces/connector.mojom. Using this connection
598 // the caller can then request connections to other services.
599 // NOTE: This handle is not strongly typed because neither the Blink nor
600 // Chromium types generated from connector.mojom should leak across the
601 // Blink-Chromium boundary.
602 virtual void bindServiceConnector(mojo::ScopedMessagePipeHandle remoteHandle);
603
604 // Platform events ----------------------------------------------------- 598 // Platform events -----------------------------------------------------
605 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. 599 // Device Orientation, Device Motion, Device Light, Battery, Gamepad.
606 600
607 // Request the platform to start listening to the events of the specified 601 // Request the platform to start listening to the events of the specified
608 // type and notify the given listener (if not null) when there is an update. 602 // type and notify the given listener (if not null) when there is an update.
609 virtual void startListening(WebPlatformEventType type, 603 virtual void startListening(WebPlatformEventType type,
610 WebPlatformEventListener* listener) {} 604 WebPlatformEventListener* listener) {}
611 605
612 // Request the platform to stop listening to the specified event and no 606 // Request the platform to stop listening to the specified event and no
613 // longer notify the listener, if any. 607 // longer notify the listener, if any.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 protected: 666 protected:
673 Platform(); 667 Platform();
674 virtual ~Platform() {} 668 virtual ~Platform() {}
675 669
676 WebThread* m_mainThread; 670 WebThread* m_mainThread;
677 }; 671 };
678 672
679 } // namespace blink 673 } // namespace blink
680 674
681 #endif 675 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698