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

Side by Side Diff: mojo/services/native_viewport/native_viewport_service.cc

Issue 134253004: Mojo: AsyncWaiter and mojo/public/environment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/services/native_viewport/native_viewport_service.h" 5 #include "mojo/services/native_viewport/native_viewport_service.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "mojo/common/bindings_support_impl.h"
10 #include "mojo/services/gles2/gles2_impl.h" 9 #include "mojo/services/gles2/gles2_impl.h"
11 #include "mojo/services/native_viewport/native_viewport.h" 10 #include "mojo/services/native_viewport/native_viewport.h"
12 #include "mojom/native_viewport.h" 11 #include "mojom/native_viewport.h"
13 #include "ui/events/event.h" 12 #include "ui/events/event.h"
14 13
15 namespace mojo { 14 namespace mojo {
16 namespace services { 15 namespace services {
17 namespace { 16 namespace {
18 17
19 bool IsRateLimitedEventType(ui::Event* event) { 18 bool IsRateLimitedEventType(ui::Event* event) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Android will call this. 174 // Android will call this.
176 mojo::services::NativeViewportService* 175 mojo::services::NativeViewportService*
177 CreateNativeViewportService(mojo::ScopedMessagePipeHandle shell_handle) { 176 CreateNativeViewportService(mojo::ScopedMessagePipeHandle shell_handle) {
178 return new mojo::services::NativeViewportService(shell_handle.Pass()); 177 return new mojo::services::NativeViewportService(shell_handle.Pass());
179 } 178 }
180 179
181 #else 180 #else
182 181
183 extern "C" MOJO_NATIVE_VIEWPORT_EXPORT MojoResult MojoMain( 182 extern "C" MOJO_NATIVE_VIEWPORT_EXPORT MojoResult MojoMain(
184 const MojoHandle shell_handle) { 183 const MojoHandle shell_handle) {
185 mojo::common::BindingsSupportImpl bindings_support_impl;
186 mojo::BindingsSupport::Set(&bindings_support_impl);
187
188 base::MessageLoopForUI loop; 184 base::MessageLoopForUI loop;
189 mojo::services::NativeViewportService app( 185 mojo::services::NativeViewportService app(
190 mojo::MakeScopedHandle(mojo::MessagePipeHandle(shell_handle)).Pass()); 186 mojo::MakeScopedHandle(mojo::MessagePipeHandle(shell_handle)).Pass());
191 base::MessageLoop::current()->Run(); 187 base::MessageLoop::current()->Run();
192
193 mojo::BindingsSupport::Set(NULL);
194 return MOJO_RESULT_OK; 188 return MOJO_RESULT_OK;
195 } 189 }
196 190
197 #endif // !OS_ANDROID 191 #endif // !OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698