OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_DEMO_UI_EVENTS_EVENTS_DEMO_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_DEMO_UI_EVENTS_EVENTS_DEMO_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" |
| 10 #include "components/demo_ui/events/events_demo_view_model.h" |
| 11 |
| 12 class EventsDemo : public gen::EventsDemoViewModel { |
| 13 public: |
| 14 class Observer { |
| 15 public: |
| 16 virtual void EventsCounterChanged() = 0; |
| 17 }; |
| 18 |
| 19 EventsDemo(); |
| 20 ~EventsDemo() override; |
| 21 |
| 22 void AddObserver(Observer* observer); |
| 23 void RemoveObserver(Observer* observer); |
| 24 |
| 25 static void Register(); |
| 26 |
| 27 private: |
| 28 void OnButtonClicked() override; |
| 29 |
| 30 ObserverList<Observer> observers_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(EventsDemo); |
| 33 }; |
| 34 |
| 35 #endif // CHROME_BROWSER_UI_WEBUI_DEMO_UI_EVENTS_EVENTS_DEMO_H_ |
OLD | NEW |