OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_MESSAGE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "components/invalidation/impl/invalidation_logger_observer.h" | 14 #include "components/invalidation/impl/invalidation_logger_observer.h" |
15 #include "components/invalidation/public/invalidation_util.h" | 15 #include "components/invalidation/public/invalidation_util.h" |
16 #include "content/public/browser/web_ui_message_handler.h" | 16 #include "content/public/browser/web_ui_message_handler.h" |
17 | 17 |
18 class Profile; | |
19 | |
20 namespace invalidation { | 18 namespace invalidation { |
21 class InvalidationLogger; | 19 class InvalidationLogger; |
22 } // namespace invalidation | 20 } // namespace invalidation |
23 | 21 |
24 namespace syncer { | |
25 class InvalidationHandler; | |
26 } // namespace syncer | |
27 | |
28 // The implementation for the chrome://invalidations page. | 22 // The implementation for the chrome://invalidations page. |
29 class InvalidationsMessageHandler | 23 class InvalidationsMessageHandler |
30 : public content::WebUIMessageHandler, | 24 : public content::WebUIMessageHandler, |
31 public invalidation::InvalidationLoggerObserver { | 25 public invalidation::InvalidationLoggerObserver { |
32 public: | 26 public: |
33 InvalidationsMessageHandler(); | 27 InvalidationsMessageHandler(); |
34 ~InvalidationsMessageHandler() override; | 28 ~InvalidationsMessageHandler() override; |
35 | 29 |
36 // Implementation of InvalidationLoggerObserver. | 30 // Implementation of InvalidationLoggerObserver. |
37 void OnRegistrationChange( | 31 void OnRegistrationChange( |
(...skipping 24 matching lines...) Expand all Loading... |
62 // Used to get the information necessary to display to the JS and to | 56 // Used to get the information necessary to display to the JS and to |
63 // register ourselves as Observers for any notifications. | 57 // register ourselves as Observers for any notifications. |
64 invalidation::InvalidationLogger* logger_; | 58 invalidation::InvalidationLogger* logger_; |
65 | 59 |
66 base::WeakPtrFactory<InvalidationsMessageHandler> weak_ptr_factory_; | 60 base::WeakPtrFactory<InvalidationsMessageHandler> weak_ptr_factory_; |
67 | 61 |
68 DISALLOW_COPY_AND_ASSIGN(InvalidationsMessageHandler); | 62 DISALLOW_COPY_AND_ASSIGN(InvalidationsMessageHandler); |
69 }; | 63 }; |
70 | 64 |
71 #endif // CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_MESSAGE_HANDLER_H_ | 65 #endif // CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_MESSAGE_HANDLER_H_ |
OLD | NEW |