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

Side by Side Diff: mojo/examples/png_viewer/png_viewer.cc

Issue 441853002: mojo: first take on removing mojo_main_{chromium,standalone}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_tokenizer.h" 8 #include "base/strings/string_tokenizer.h"
9 #include "mojo/examples/media_viewer/media_viewer.mojom.h" 9 #include "mojo/examples/media_viewer/media_viewer.mojom.h"
10 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_connection.h" 11 #include "mojo/public/cpp/application/application_connection.h"
11 #include "mojo/public/cpp/application/application_delegate.h" 12 #include "mojo/public/cpp/application/application_delegate.h"
13 #include "mojo/public/cpp/application/application_runner_chromium.h"
12 #include "mojo/public/cpp/application/interface_factory_impl.h" 14 #include "mojo/public/cpp/application/interface_factory_impl.h"
13 #include "mojo/services/public/cpp/view_manager/types.h" 15 #include "mojo/services/public/cpp/view_manager/types.h"
14 #include "mojo/services/public/cpp/view_manager/view.h" 16 #include "mojo/services/public/cpp/view_manager/view.h"
15 #include "mojo/services/public/cpp/view_manager/view_manager.h" 17 #include "mojo/services/public/cpp/view_manager/view_manager.h"
16 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" 18 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
17 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 19 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
18 #include "mojo/services/public/cpp/view_manager/view_observer.h" 20 #include "mojo/services/public/cpp/view_manager/view_observer.h"
19 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h" 21 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
20 #include "skia/ext/platform_canvas.h" 22 #include "skia/ext/platform_canvas.h"
21 #include "skia/ext/refptr.h" 23 #include "skia/ext/refptr.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 void ZoomableMediaImpl::ZoomToActualSize() { 239 void ZoomableMediaImpl::ZoomToActualSize() {
238 viewer_->ZoomToActualSize(); 240 viewer_->ZoomToActualSize();
239 } 241 }
240 242
241 void NavigatorImpl::UpdateView(Id view_id, 243 void NavigatorImpl::UpdateView(Id view_id,
242 const SkBitmap& bitmap) { 244 const SkBitmap& bitmap) {
243 viewer_->UpdateView(view_id, bitmap); 245 viewer_->UpdateView(view_id, bitmap);
244 } 246 }
245 247
246 } // namespace examples 248 } // namespace examples
249 } // namespace mojo
247 250
248 // static 251 MojoResult MojoMain(MojoHandle shell_handle) {
249 ApplicationDelegate* ApplicationDelegate::Create() { 252 mojo::ApplicationRunnerChromium runner(new mojo::examples::PNGViewer);
250 return new examples::PNGViewer; 253 return runner.Run(shell_handle);
251 } 254 }
252
253 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/pepper_container_app/pepper_container_app.cc ('k') | mojo/examples/sample_app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698