| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/prefs/pref_change_registrar.h" | 11 #include "base/prefs/pref_change_registrar.h" |
| 12 #include "chrome/browser/sync/profile_sync_service.h" | |
| 13 #include "chrome/browser/sync/sync_ui_util.h" | 12 #include "chrome/browser/sync/sync_ui_util.h" |
| 13 #include "components/browser_sync/browser/profile_sync_service.h" |
| 14 #include "content/public/browser/web_ui_message_handler.h" | 14 #include "content/public/browser/web_ui_message_handler.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class ListValue; | 17 class ListValue; |
| 18 } | 18 } |
| 19 | 19 |
| 20 // Sends sync-state changes to the New Tab Page for UI updating and forwards | 20 // Sends sync-state changes to the New Tab Page for UI updating and forwards |
| 21 // link clicks on the page to the sync service. | 21 // link clicks on the page to the sync service. |
| 22 class NewTabPageSyncHandler : public content::WebUIMessageHandler, | 22 class NewTabPageSyncHandler : public content::WebUIMessageHandler, |
| 23 public sync_driver::SyncServiceObserver { | 23 public sync_driver::SyncServiceObserver { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 PrefChangeRegistrar profile_pref_registrar_; | 71 PrefChangeRegistrar profile_pref_registrar_; |
| 72 | 72 |
| 73 // Used to make sure we don't register ourselves twice if the user refreshes | 73 // Used to make sure we don't register ourselves twice if the user refreshes |
| 74 // the new tab page. | 74 // the new tab page. |
| 75 bool waiting_for_initial_page_load_; | 75 bool waiting_for_initial_page_load_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(NewTabPageSyncHandler); | 77 DISALLOW_COPY_AND_ASSIGN(NewTabPageSyncHandler); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ | 80 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ |
| OLD | NEW |