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

Side by Side Diff: mojo/examples/embedded_app/embedded_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
« no previous file with comments | « mojo/examples/echo/echo_service.cc ('k') | mojo/examples/keyboard/keyboard.cc » ('j') | 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.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"
12 #include "mojo/public/cpp/application/application_impl.h" 13 #include "mojo/public/cpp/application/application_impl.h"
14 #include "mojo/public/cpp/application/application_runner_chromium.h"
13 #include "mojo/public/cpp/application/interface_factory_impl.h" 15 #include "mojo/public/cpp/application/interface_factory_impl.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 "ui/events/event_constants.h" 22 #include "ui/events/event_constants.h"
21 #include "url/gurl.h" 23 #include "url/gurl.h"
22 #include "url/url_util.h" 24 #include "url/url_util.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // TODO(aa): Verify new URL is same origin as current origin. 147 // TODO(aa): Verify new URL is same origin as current origin.
146 SkColor color = 0x00; 148 SkColor color = 0x00;
147 if (!base::HexStringToUInt(url.path().substr(1), &color)) { 149 if (!base::HexStringToUInt(url.path().substr(1), &color)) {
148 LOG(ERROR) << "Invalid URL, path not convertible to integer"; 150 LOG(ERROR) << "Invalid URL, path not convertible to integer";
149 return; 151 return;
150 } 152 }
151 app_->SetViewColor(view_id, color); 153 app_->SetViewColor(view_id, color);
152 } 154 }
153 155
154 } // namespace examples 156 } // namespace examples
157 } // namespace mojo
155 158
156 // static 159 MojoResult MojoMain(MojoHandle shell_handle) {
157 ApplicationDelegate* ApplicationDelegate::Create() { 160 mojo::ApplicationRunnerChromium runner(new mojo::examples::EmbeddedApp);
158 return new examples::EmbeddedApp; 161 return runner.Run(shell_handle);
159 } 162 }
160
161 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/echo/echo_service.cc ('k') | mojo/examples/keyboard/keyboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698