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

Side by Side Diff: mojo/examples/nesting_app/nesting_app.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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "mojo/examples/window_manager/window_manager.mojom.h" 9 #include "mojo/examples/window_manager/window_manager.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/view.h" 15 #include "mojo/services/public/cpp/view_manager/view.h"
14 #include "mojo/services/public/cpp/view_manager/view_manager.h" 16 #include "mojo/services/public/cpp/view_manager/view_manager.h"
15 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" 17 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
16 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 18 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
17 #include "mojo/services/public/cpp/view_manager/view_observer.h" 19 #include "mojo/services/public/cpp/view_manager/view_observer.h"
18 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h" 20 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
19 #include "ui/events/event_constants.h" 21 #include "ui/events/event_constants.h"
20 #include "url/gurl.h" 22 #include "url/gurl.h"
21 23
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 GURL url(navigation_details->request->url.To<std::string>()); 131 GURL url(navigation_details->request->url.To<std::string>());
130 if (!url.is_valid()) { 132 if (!url.is_valid()) {
131 LOG(ERROR) << "URL is invalid."; 133 LOG(ERROR) << "URL is invalid.";
132 return; 134 return;
133 } 135 }
134 app_->set_color(url.path().substr(1)); 136 app_->set_color(url.path().substr(1));
135 app_->NavigateChild(); 137 app_->NavigateChild();
136 } 138 }
137 139
138 } // namespace examples 140 } // namespace examples
141 } // namespace mojo
139 142
140 // static 143 MojoResult MojoMain(MojoHandle shell_handle) {
141 ApplicationDelegate* ApplicationDelegate::Create() { 144 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp);
142 return new examples::NestingApp; 145 return runner.Run(shell_handle);
143 } 146 }
144
145 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/media_viewer/media_viewer.cc ('k') | mojo/examples/pepper_container_app/pepper_container_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698