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

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

Issue 10154004: re-use WebUIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WeakPtr solution Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DOWNLOADS_DOM_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 std::wstring search_text_; 111 std::wstring search_text_;
112 112
113 // Our model 113 // Our model
114 content::DownloadManager* download_manager_; 114 content::DownloadManager* download_manager_;
115 115
116 // If |download_manager_| belongs to an incognito profile than this 116 // If |download_manager_| belongs to an incognito profile than this
117 // is the DownloadManager for the original profile; otherwise, this is 117 // is the DownloadManager for the original profile; otherwise, this is
118 // NULL. 118 // NULL.
119 content::DownloadManager* original_profile_download_manager_; 119 content::DownloadManager* original_profile_download_manager_;
120 120
121 // True once the page has loaded the first time (it may load multiple times,
122 // e.g. on reload).
123 bool initialized_;
124
121 // The current set of visible DownloadItems for this view received from the 125 // The current set of visible DownloadItems for this view received from the
122 // DownloadManager. DownloadManager owns the DownloadItems. The vector is 126 // DownloadManager. DownloadManager owns the DownloadItems. The vector is
123 // kept in order, sorted by ascending start time. 127 // kept in order, sorted by ascending start time.
124 // Note that when a download item is removed, the entry in the vector becomes 128 // Note that when a download item is removed, the entry in the vector becomes
125 // null. This should only be a transient state, as a ModelChanged() 129 // null. This should only be a transient state, as a ModelChanged()
126 // notification should follow close on the heels of such a change. 130 // notification should follow close on the heels of such a change.
127 typedef std::vector<content::DownloadItem*> OrderedDownloads; 131 typedef std::vector<content::DownloadItem*> OrderedDownloads;
128 OrderedDownloads download_items_; 132 OrderedDownloads download_items_;
129 133
130 base::WeakPtrFactory<DownloadsDOMHandler> weak_ptr_factory_; 134 base::WeakPtrFactory<DownloadsDOMHandler> weak_ptr_factory_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); 136 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler);
133 }; 137 };
134 138
135 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ 139 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/options_page.js ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698