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

Side by Side Diff: services/js/js_app_shell.cc

Issue 758823002: Fix Windows build after https://codereview.chromium.org/757703002/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/js/js_app_shell.h" 5 #include "services/js/js_app_shell.h"
6 6
7 #include "gin/object_template_builder.h" 7 #include "gin/object_template_builder.h"
8 #include "services/js/js_app.h" 8 #include "services/js/js_app.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace js { 11 namespace js {
12 12
13 gin::WrapperInfo JSAppShell::kWrapperInfo = {gin::kEmbedderNativeGin}; 13 gin::WrapperInfo JSAppShell::kWrapperInfo = {gin::kEmbedderNativeGin};
14 14
15 gin::Handle<JSAppShell> JSAppShell::Create(v8::Isolate* isolate, 15 gin::Handle<JSAppShell> JSAppShell::Create(v8::Isolate* isolate,
16 JSApp* js_app) { 16 JSApp* js_app) {
17 return CreateHandle(isolate, new JSAppShell(js_app)); 17 return gin::CreateHandle(isolate, new JSAppShell(js_app));
jamesr 2014/11/25 18:27:55 do you have any idea how this compiled before? 'i
jamesr 2014/11/25 18:29:19 Actually, JSAppShell inherits from gin::Wrappable<
18 } 18 }
19 19
20 JSAppShell::JSAppShell(JSApp* js_app) : js_app_(js_app) { 20 JSAppShell::JSAppShell(JSApp* js_app) : js_app_(js_app) {
21 } 21 }
22 22
23 JSAppShell::~JSAppShell() { 23 JSAppShell::~JSAppShell() {
24 } 24 }
25 25
26 gin::ObjectTemplateBuilder JSAppShell::GetObjectTemplateBuilder( 26 gin::ObjectTemplateBuilder JSAppShell::GetObjectTemplateBuilder(
27 v8::Isolate* isolate) { 27 v8::Isolate* isolate) {
28 return gin::Wrappable<JSAppShell>::GetObjectTemplateBuilder(isolate) 28 return gin::Wrappable<JSAppShell>::GetObjectTemplateBuilder(isolate)
29 .SetMethod("connectToApplication", &JSAppShell::ConnectToApplication); 29 .SetMethod("connectToApplication", &JSAppShell::ConnectToApplication);
30 } 30 }
31 31
32 void JSAppShell::ConnectToApplication( 32 void JSAppShell::ConnectToApplication(
33 const std::string& application_url, mojo::Handle service_provider) { 33 const std::string& application_url, mojo::Handle service_provider) {
34 // TODO(hansmuller): Validate arguments. 34 // TODO(hansmuller): Validate arguments.
35 // TODO(hansmuller): Service_provider may be a ServiceProviderProxy. 35 // TODO(hansmuller): Service_provider may be a ServiceProviderProxy.
36 MessagePipeHandle message_pipe_handle(service_provider.value()); 36 MessagePipeHandle message_pipe_handle(service_provider.value());
37 ScopedMessagePipeHandle scoped_handle(message_pipe_handle); 37 ScopedMessagePipeHandle scoped_handle(message_pipe_handle);
38 js_app_->ConnectToApplication(application_url, scoped_handle.Pass()); 38 js_app_->ConnectToApplication(application_url, scoped_handle.Pass());
39 } 39 }
40 40
41 } // namespace js 41 } // namespace js
42 } // namespace mojo 42 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698