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

Unified Diff: chrome/browser/renderer_host/render_view_host.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 | « no previous file | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host.h
===================================================================
--- chrome/browser/renderer_host/render_view_host.h (revision 46794)
+++ chrome/browser/renderer_host/render_view_host.h (working copy)
@@ -9,7 +9,9 @@
#include <vector>
#include "base/scoped_ptr.h"
+#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/find_bar_controller.h"
+#include "chrome/browser/icon_manager.h"
#include "chrome/browser/renderer_host/render_widget_host.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/common/page_zoom.h"
@@ -25,6 +27,7 @@
#include "webkit/glue/window_open_disposition.h"
class FilePath;
+class IconRequestProvider;
class ListValue;
class RenderViewHostDelegate;
class SiteInstance;
@@ -358,6 +361,10 @@
// from an Open File dialog for the form.
void FilesSelectedInChooser(const std::vector<FilePath>& files);
+ // The type for icon loading.
+ typedef CancelableRequestConsumerT<int, 0> CancelableConsumer;
+ void OnIconLoaded(int request_id, SkBitmap* icon);
+
// Notifies the RenderViewHost that its load state changed.
void LoadStateChanged(const GURL& url, net::LoadState load_state,
uint64 upload_position, uint64 upload_size);
@@ -543,6 +550,8 @@
void OnMsgSelectionChanged(const std::string& text);
void OnMsgPasteFromSelectionClipboard();
void OnMsgRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params);
+ void OnMsgChooseIconForFiles(int request_id,
+ const std::vector<FilePath>& filenames);
void OnMsgRunJavaScriptMessage(const std::wstring& message,
const std::wstring& default_prompt,
const GURL& frame_url,
@@ -703,6 +712,10 @@
// The session storage namespace id to be used by the associated render view.
int64 session_storage_namespace_id_;
+ // For icon loading by OnMsgChooseIconForFiles().
+ CancelableConsumer cancelable_consumer_;
+ scoped_ptr<IconRequestProvider> icon_request_provider_;
+
// Whether this render view will be used for extensions. This controls
// what process type we use.
bool is_extension_process_;
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698