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

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

Issue 1250463002: Renames WeakBindingSet to BindingSet. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebasing Created 5 years, 5 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/nfc_sender/nfc_sender.cc ('k') | examples/window_manager/window_manager.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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "mojo/application/application_runner_chromium.h" 7 #include "mojo/application/application_runner_chromium.h"
8 #include "mojo/common/weak_binding_set.h" 8 #include "mojo/common/binding_set.h"
9 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
11 #include "mojo/public/cpp/application/application_impl.h" 11 #include "mojo/public/cpp/application/application_impl.h"
12 #include "mojo/services/notifications/public/interfaces/notifications.mojom.h" 12 #include "mojo/services/notifications/public/interfaces/notifications.mojom.h"
13 13
14 namespace examples { 14 namespace examples {
15 15
16 static const base::TimeDelta kDefaultMessageDelay = 16 static const base::TimeDelta kDefaultMessageDelay =
17 base::TimeDelta::FromMilliseconds(3000); 17 base::TimeDelta::FromMilliseconds(3000);
18 18
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return notification_data; 99 return notification_data;
100 } 100 }
101 101
102 void PostDelayed(base::Closure closure) { 102 void PostDelayed(base::Closure closure) {
103 base::MessageLoop::current()->PostDelayedTask(FROM_HERE, closure, 103 base::MessageLoop::current()->PostDelayedTask(FROM_HERE, closure,
104 kDefaultMessageDelay); 104 kDefaultMessageDelay);
105 } 105 }
106 106
107 private: 107 private:
108 notifications::NotificationServicePtr notification_service_; 108 notifications::NotificationServicePtr notification_service_;
109 mojo::WeakBindingSet<notifications::NotificationClient> client_bindings_; 109 mojo::BindingSet<notifications::NotificationClient> client_bindings_;
110 notifications::NotificationPtr first_notification_; 110 notifications::NotificationPtr first_notification_;
111 notifications::NotificationPtr second_notification_; 111 notifications::NotificationPtr second_notification_;
112 notifications::NotificationPtr dismissed_notification_; 112 notifications::NotificationPtr dismissed_notification_;
113 notifications::NotificationPtr select_notification_; 113 notifications::NotificationPtr select_notification_;
114 114
115 DISALLOW_COPY_AND_ASSIGN(NotificationGeneratorDelegate); 115 DISALLOW_COPY_AND_ASSIGN(NotificationGeneratorDelegate);
116 }; 116 };
117 117
118 } // namespace examples 118 } // namespace examples
119 119
120 MojoResult MojoMain(MojoHandle application_request) { 120 MojoResult MojoMain(MojoHandle application_request) {
121 mojo::ApplicationRunnerChromium runner( 121 mojo::ApplicationRunnerChromium runner(
122 new examples::NotificationGeneratorDelegate); 122 new examples::NotificationGeneratorDelegate);
123 return runner.Run(application_request); 123 return runner.Run(application_request);
124 } 124 }
OLDNEW
« no previous file with comments | « examples/nfc_sender/nfc_sender.cc ('k') | examples/window_manager/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698