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

Unified Diff: sky/viewer/internals.h

Issue 837283002: Mojo JS Bindings: merge Application, Shell, ServiceProvider with Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Commit missing file Created 5 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 side-by-side diff with in-line comments
Download patch
Index: sky/viewer/internals.h
diff --git a/sky/viewer/internals.h b/sky/viewer/internals.h
index c2e9a93b5e0e3968ca3f8d32660bf39df8a4f255..58a7781af997a5af714bb7df629b2fffb5685ba6 100644
--- a/sky/viewer/internals.h
+++ b/sky/viewer/internals.h
@@ -9,12 +9,14 @@
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "gin/wrappable.h"
+#include "mojo/public/interfaces/application/shell.mojom.h"
#include "sky/services/testing/test_harness.mojom.h"
namespace sky {
class DocumentView;
-class Internals : public gin::Wrappable<Internals> {
+class Internals : public gin::Wrappable<Internals>,
+ public mojo::Shell {
public:
static gin::WrapperInfo kWrapperInfo;
static gin::Handle<Internals> Create(v8::Isolate*, DocumentView*);
@@ -27,6 +29,12 @@ class Internals : public gin::Wrappable<Internals> {
private:
explicit Internals(DocumentView* document_view);
+ // mojo::Shell method:
+ void ConnectToApplication(
+ const mojo::String& application_url,
+ mojo::InterfaceRequest<mojo::ServiceProvider> provider) override;
+
+ mojo::Handle PassShellProxyHandle();
std::string RenderTreeAsText();
std::string ContentAsText();
void NotifyTestComplete(const std::string& test_result);
@@ -39,6 +47,7 @@ class Internals : public gin::Wrappable<Internals> {
void pauseAnimations(double pauseTime);
base::WeakPtr<DocumentView> document_view_;
+ mojo::Binding<mojo::Shell> shell_binding_;
TestHarnessPtr test_harness_;
MOJO_DISALLOW_COPY_AND_ASSIGN(Internals);
« sky/tools/skydb ('K') | « sky/viewer/BUILD.gn ('k') | sky/viewer/internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698