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

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/sync/profile_sync_service.h" 11 #include "chrome/browser/sync/profile_sync_service.h"
12 #include "chrome/browser/sync/sync_ui_util.h" 12 #include "chrome/browser/sync/sync_ui_util.h"
13 #include "content/browser/webui/web_ui.h" 13 #include "content/public/browser/web_ui_message_handler.h"
14 14
15 namespace base { 15 namespace base {
16 class ListValue; 16 class ListValue;
17 } 17 }
18 18
19 // Sends sync-state changes to the New Tab Page for UI updating and forwards 19 // Sends sync-state changes to the New Tab Page for UI updating and forwards
20 // link clicks on the page to the sync service. 20 // link clicks on the page to the sync service.
21 class NewTabPageSyncHandler : public WebUIMessageHandler, 21 class NewTabPageSyncHandler : public content::WebUIMessageHandler,
22 public ProfileSyncServiceObserver { 22 public ProfileSyncServiceObserver {
23 public: 23 public:
24 NewTabPageSyncHandler(); 24 NewTabPageSyncHandler();
25 virtual ~NewTabPageSyncHandler(); 25 virtual ~NewTabPageSyncHandler();
26 26
27 // WebUIMessageHandler implementation. 27 // WebUIMessageHandler implementation.
28 virtual void RegisterMessages() OVERRIDE; 28 virtual void RegisterMessages() OVERRIDE;
29 29
30 // Callback for "GetSyncMessage". 30 // Callback for "GetSyncMessage".
31 void HandleGetSyncMessage(const base::ListValue* args); 31 void HandleGetSyncMessage(const base::ListValue* args);
(...skipping 29 matching lines...) Expand all
61 ProfileSyncService* sync_service_; 61 ProfileSyncService* sync_service_;
62 62
63 // Used to make sure we don't register ourselves twice if the user refreshes 63 // Used to make sure we don't register ourselves twice if the user refreshes
64 // the new tab page. 64 // the new tab page.
65 bool waiting_for_initial_page_load_; 65 bool waiting_for_initial_page_load_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(NewTabPageSyncHandler); 67 DISALLOW_COPY_AND_ASSIGN(NewTabPageSyncHandler);
68 }; 68 };
69 69
70 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_ 70 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_SYNC_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698