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

Unified Diff: chrome/renderer/render_view.h

Issue 174318: Introduce new async IPC message to get file icons (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.h
===================================================================
--- chrome/renderer/render_view.h (revision 46794)
+++ chrome/renderer/render_view.h (working copy)
@@ -15,6 +15,7 @@
#include "app/surface/transport_dib.h"
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/hash_tables.h"
#include "base/id_map.h"
#include "base/linked_ptr.h"
#include "base/shared_memory.h"
@@ -220,6 +221,9 @@
virtual WebKit::WebNotificationPresenter* notificationPresenter() {
return notification_provider_.get();
}
+ virtual bool chooseIconForFiles(
+ const WebKit::WebVector<WebKit::WebString>& filenames,
+ WebKit::WebIconLoadingCompletion* completion);
virtual void didStartLoading();
virtual void didStopLoading();
virtual bool isSmartInsertDeleteEnabled();
@@ -717,6 +721,8 @@
void OnDragSourceSystemDragEnded();
void OnInstallMissingPlugin();
void OnFileChooserResponse(const std::vector<FilePath>& paths);
+ void OnChooseIconForFilesResponse(
+ int request_id, const std::vector<unsigned char>& icon_data);
void OnEnableViewSourceMode();
void OnEnablePreferredSizeChangedMode();
void OnDisableScrollbarsForSmallWindows(
@@ -1046,6 +1052,13 @@
struct PendingFileChooser;
std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_;
+ // How many times chooseIconForFiles() is called.
+ int choose_icon_for_files_counter_;
+
+ // icon_for_files_counter_ -> WebIconLoadingCompletion* map.
+ typedef base::hash_map<int, WebKit::WebIconLoadingCompletion*> IconLoadingMap;
+ IconLoadingMap icon_loading_map_;
+
int history_list_offset_;
int history_list_length_;
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698