| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SKY_VIEWER_INTERNALS_H_ | |
| 6 #define SKY_VIEWER_INTERNALS_H_ | |
| 7 | |
| 8 #include "base/memory/weak_ptr.h" | |
| 9 #include "base/supports_user_data.h" | |
| 10 #include "dart/runtime/include/dart_api.h" | |
| 11 #include "mojo/public/cpp/bindings/binding.h" | |
| 12 #include "mojo/public/interfaces/application/shell.mojom.h" | |
| 13 #include "sky/services/testing/test_harness.mojom.h" | |
| 14 | |
| 15 namespace sky { | |
| 16 class DocumentView; | |
| 17 | |
| 18 class Internals : public base::SupportsUserData::Data, | |
| 19 public mojo::Shell { | |
| 20 public: | |
| 21 ~Internals() override; | |
| 22 | |
| 23 static void Create(Dart_Isolate isolate, DocumentView* document_view); | |
| 24 | |
| 25 // mojo::Shell method: | |
| 26 void ConnectToApplication( | |
| 27 const mojo::String& application_url, | |
| 28 mojo::InterfaceRequest<mojo::ServiceProvider> services, | |
| 29 mojo::ServiceProviderPtr exposed_services) override; | |
| 30 | |
| 31 void NotifyTestComplete(const std::string& test_result); | |
| 32 | |
| 33 mojo::Handle TakeShellProxyHandle(); | |
| 34 mojo::Handle TakeServicesProvidedToEmbedder(); | |
| 35 mojo::Handle TakeServicesProvidedByEmbedder(); | |
| 36 mojo::Handle TakeServiceRegistry(); | |
| 37 | |
| 38 private: | |
| 39 explicit Internals(DocumentView* document_view); | |
| 40 | |
| 41 base::WeakPtr<DocumentView> document_view_; | |
| 42 mojo::Binding<mojo::Shell> shell_binding_; | |
| 43 TestHarnessPtr test_harness_; | |
| 44 | |
| 45 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); | |
| 46 }; | |
| 47 | |
| 48 } // namespace sky | |
| 49 | |
| 50 #endif // SKY_VIEWER_INTERNALS_H_ | |
| OLD | NEW |