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

Side by Side Diff: examples/notification_generator/notification_generator.cc

Issue 2011383002: Get rid of {Run,Terminate}MainApplication(), and more ApplicationDelegate conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 4 years, 6 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
« no previous file with comments | « examples/native_run_app/native_run_app.cc ('k') | examples/spinning_cube/spinning_cube_app.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "mojo/common/binding_set.h" 10 #include "mojo/common/binding_set.h"
11 #include "mojo/environment/scoped_chromium_init.h"
11 #include "mojo/public/c/system/main.h" 12 #include "mojo/public/c/system/main.h"
12 #include "mojo/public/cpp/application/application_impl_base.h" 13 #include "mojo/public/cpp/application/application_impl_base.h"
13 #include "mojo/public/cpp/application/connect.h" 14 #include "mojo/public/cpp/application/connect.h"
14 #include "mojo/public/cpp/application/run_application.h" 15 #include "mojo/public/cpp/application/run_application.h"
15 #include "mojo/services/notifications/interfaces/notifications.mojom.h" 16 #include "mojo/services/notifications/interfaces/notifications.mojom.h"
16 17
17 namespace examples { 18 namespace examples {
18 19
19 static const base::TimeDelta kDefaultMessageDelay = 20 static const base::TimeDelta kDefaultMessageDelay =
20 base::TimeDelta::FromMilliseconds(3000); 21 base::TimeDelta::FromMilliseconds(3000);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 notifications::NotificationPtr second_notification_; 112 notifications::NotificationPtr second_notification_;
112 notifications::NotificationPtr dismissed_notification_; 113 notifications::NotificationPtr dismissed_notification_;
113 notifications::NotificationPtr select_notification_; 114 notifications::NotificationPtr select_notification_;
114 115
115 DISALLOW_COPY_AND_ASSIGN(NotificationGeneratorApp); 116 DISALLOW_COPY_AND_ASSIGN(NotificationGeneratorApp);
116 }; 117 };
117 118
118 } // namespace examples 119 } // namespace examples
119 120
120 MojoResult MojoMain(MojoHandle application_request) { 121 MojoResult MojoMain(MojoHandle application_request) {
122 mojo::ScopedChromiumInit init;
121 examples::NotificationGeneratorApp notification_generator_app; 123 examples::NotificationGeneratorApp notification_generator_app;
122 return mojo::RunMainApplication(application_request, 124 return mojo::RunApplication(application_request, &notification_generator_app);
123 &notification_generator_app);
124 } 125 }
OLDNEW
« no previous file with comments | « examples/native_run_app/native_run_app.cc ('k') | examples/spinning_cube/spinning_cube_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698