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

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

Issue 298653010: Change Shell / ShellClient to ServiceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Support content Mojo stuff Created 6 years, 7 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/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "mojo/geometry/geometry_type_converters.h" 10 #include "mojo/geometry/geometry_type_converters.h"
11 #include "mojo/public/cpp/bindings/allocation_scope.h" 11 #include "mojo/public/cpp/bindings/allocation_scope.h"
12 #include "mojo/public/interfaces/shell/shell.mojom.h" 12 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
13 #include "mojo/services/gles2/command_buffer_impl.h" 13 #include "mojo/services/gles2/command_buffer_impl.h"
14 #include "mojo/services/native_viewport/native_viewport.h" 14 #include "mojo/services/native_viewport/native_viewport.h"
15 #include "mojo/services/native_viewport/native_viewport.mojom.h" 15 #include "mojo/services/native_viewport/native_viewport.mojom.h"
16 #include "ui/events/event.h" 16 #include "ui/events/event.h"
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace services { 19 namespace services {
20 namespace { 20 namespace {
21 21
22 bool IsRateLimitedEventType(ui::Event* event) { 22 bool IsRateLimitedEventType(ui::Event* event) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ScopedMessagePipeHandle command_buffer_handle_; 179 ScopedMessagePipeHandle command_buffer_handle_;
180 scoped_ptr<CommandBufferImpl> command_buffer_; 180 scoped_ptr<CommandBufferImpl> command_buffer_;
181 bool waiting_for_event_ack_; 181 bool waiting_for_event_ack_;
182 }; 182 };
183 183
184 } // namespace services 184 } // namespace services
185 } // namespace mojo 185 } // namespace mojo
186 186
187 187
188 MOJO_NATIVE_VIEWPORT_EXPORT mojo::Application* 188 MOJO_NATIVE_VIEWPORT_EXPORT mojo::Application*
189 CreateNativeViewportService(mojo::shell::Context* context, 189 CreateNativeViewportService(
190 mojo::ScopedMessagePipeHandle shell_handle) { 190 mojo::shell::Context* context,
191 mojo::Application* app = new mojo::Application(shell_handle.Pass()); 191 mojo::ScopedMessagePipeHandle service_provider_handle) {
192 mojo::Application* app = new mojo::Application(
193 service_provider_handle.Pass());
192 app->AddService<mojo::services::NativeViewportImpl>(context); 194 app->AddService<mojo::services::NativeViewportImpl>(context);
193 return app; 195 return app;
194 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698