OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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_DOM_UI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/dom_ui/dom_ui.h" |
| 11 #include "chrome/browser/sync/profile_sync_service_observer.h" |
| 12 |
| 13 class Profile; |
| 14 |
| 15 class SyncInternalsMessageHandler : public DOMMessageHandler, |
| 16 public ProfileSyncServiceObserver { |
| 17 public: |
| 18 // Does not take ownership of |profile|, which must outlive this |
| 19 // object. |
| 20 explicit SyncInternalsMessageHandler(Profile* profile); |
| 21 virtual ~SyncInternalsMessageHandler(); |
| 22 |
| 23 // ProfileSyncServiceObserver implementation. |
| 24 virtual void OnStateChanged(); |
| 25 |
| 26 protected: |
| 27 // DOMMessageHandler implementation. |
| 28 virtual void RegisterMessages(); |
| 29 |
| 30 private: |
| 31 // Callback handlers. |
| 32 void HandleGetAboutInfo(const ListValue* args); |
| 33 |
| 34 Profile* profile_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
OLD | NEW |