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

Side by Side Diff: chrome/browser/ui/webui/history_ui.h

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (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
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/browser/ui/webui/history_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_HISTORY_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "chrome/browser/cancelable_request.h" 12 #include "chrome/browser/cancelable_request.h"
13 #include "chrome/browser/history/history.h" 13 #include "chrome/browser/history/history.h"
14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
15 #include "content/browser/webui/web_ui.h" 15 #include "content/browser/webui/web_ui.h"
16 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 #include "content/public/browser/web_ui_controller.h"
17 #include "content/public/browser/web_ui_message_handler.h" 18 #include "content/public/browser/web_ui_message_handler.h"
18 19
19 class GURL;
20
21 // The handler for Javascript messages related to the "history" view. 20 // The handler for Javascript messages related to the "history" view.
22 class BrowsingHistoryHandler : public content::WebUIMessageHandler, 21 class BrowsingHistoryHandler : public content::WebUIMessageHandler,
23 public content::NotificationObserver { 22 public content::NotificationObserver {
24 public: 23 public:
25 BrowsingHistoryHandler(); 24 BrowsingHistoryHandler();
26 virtual ~BrowsingHistoryHandler(); 25 virtual ~BrowsingHistoryHandler();
27 26
28 // WebUIMessageHandler implementation. 27 // WebUIMessageHandler implementation.
29 virtual void RegisterMessages() OVERRIDE; 28 virtual void RegisterMessages() OVERRIDE;
30 29
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 70
72 // Our consumer for delete requests to the history service. 71 // Our consumer for delete requests to the history service.
73 CancelableRequestConsumerT<int, 0> cancelable_delete_consumer_; 72 CancelableRequestConsumerT<int, 0> cancelable_delete_consumer_;
74 73
75 // The list of URLs that are in the process of being deleted. 74 // The list of URLs that are in the process of being deleted.
76 std::set<GURL> urls_to_be_deleted_; 75 std::set<GURL> urls_to_be_deleted_;
77 76
78 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler); 77 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler);
79 }; 78 };
80 79
81 class HistoryUI : public WebUI { 80 class HistoryUI : public WebUI, public content::WebUIController {
82 public: 81 public:
83 explicit HistoryUI(content::WebContents* contents); 82 explicit HistoryUI(content::WebContents* contents);
84 83
85 // Return the URL for a given search term. 84 // Return the URL for a given search term.
86 static const GURL GetHistoryURLWithSearchText(const string16& text); 85 static const GURL GetHistoryURLWithSearchText(const string16& text);
87 86
88 static RefCountedMemory* GetFaviconResourceBytes(); 87 static RefCountedMemory* GetFaviconResourceBytes();
89 88
90 private: 89 private:
91 DISALLOW_COPY_AND_ASSIGN(HistoryUI); 90 DISALLOW_COPY_AND_ASSIGN(HistoryUI);
92 }; 91 };
93 92
94 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ 93 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/browser/ui/webui/history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698