| 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 SERVICES_SKY_INTERNALS_H_ | |
| 6 #define SERVICES_SKY_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 | |
| 14 namespace sky { | |
| 15 class DocumentView; | |
| 16 | |
| 17 class Internals : public base::SupportsUserData::Data, | |
| 18 public mojo::Shell { | |
| 19 public: | |
| 20 ~Internals() override; | |
| 21 | |
| 22 static void Create(Dart_Isolate isolate, DocumentView* document_view); | |
| 23 | |
| 24 // mojo::Shell method: | |
| 25 void ConnectToApplication( | |
| 26 const mojo::String& application_url, | |
| 27 mojo::InterfaceRequest<mojo::ServiceProvider> services, | |
| 28 mojo::ServiceProviderPtr exposed_services) override; | |
| 29 | |
| 30 mojo::Handle TakeShellProxyHandle(); | |
| 31 mojo::Handle TakeServicesProvidedToEmbedder(); | |
| 32 mojo::Handle TakeServicesProvidedByEmbedder(); | |
| 33 mojo::Handle TakeServiceRegistry(); | |
| 34 | |
| 35 private: | |
| 36 explicit Internals(DocumentView* document_view); | |
| 37 | |
| 38 base::WeakPtr<DocumentView> document_view_; | |
| 39 mojo::Binding<mojo::Shell> shell_binding_; | |
| 40 | |
| 41 MOJO_DISALLOW_COPY_AND_ASSIGN(Internals); | |
| 42 }; | |
| 43 | |
| 44 } // namespace sky | |
| 45 | |
| 46 #endif // SERVICES_SKY_INTERNALS_H_ | |
| OLD | NEW |