OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <queue> | 12 #include <queue> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "app/surface/transport_dib.h" | 15 #include "app/surface/transport_dib.h" |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/file_path.h" | 17 #include "base/file_path.h" |
| 18 #include "base/hash_tables.h" |
18 #include "base/id_map.h" | 19 #include "base/id_map.h" |
19 #include "base/linked_ptr.h" | 20 #include "base/linked_ptr.h" |
20 #include "base/shared_memory.h" | 21 #include "base/shared_memory.h" |
21 #include "base/timer.h" | 22 #include "base/timer.h" |
22 #include "base/values.h" | 23 #include "base/values.h" |
23 #include "base/weak_ptr.h" | 24 #include "base/weak_ptr.h" |
24 #include "build/build_config.h" | 25 #include "build/build_config.h" |
25 #include "chrome/common/content_settings.h" | 26 #include "chrome/common/content_settings.h" |
26 #include "chrome/common/edit_command.h" | 27 #include "chrome/common/edit_command.h" |
27 #include "chrome/common/navigation_gesture.h" | 28 #include "chrome/common/navigation_gesture.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 virtual WebKit::WebWidget* createPopupMenu( | 214 virtual WebKit::WebWidget* createPopupMenu( |
214 const WebKit::WebPopupMenuInfo& info); | 215 const WebKit::WebPopupMenuInfo& info); |
215 virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(); | 216 virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(); |
216 virtual void didAddMessageToConsole( | 217 virtual void didAddMessageToConsole( |
217 const WebKit::WebConsoleMessage& message, | 218 const WebKit::WebConsoleMessage& message, |
218 const WebKit::WebString& source_name, unsigned source_line); | 219 const WebKit::WebString& source_name, unsigned source_line); |
219 virtual void printPage(WebKit::WebFrame* frame); | 220 virtual void printPage(WebKit::WebFrame* frame); |
220 virtual WebKit::WebNotificationPresenter* notificationPresenter() { | 221 virtual WebKit::WebNotificationPresenter* notificationPresenter() { |
221 return notification_provider_.get(); | 222 return notification_provider_.get(); |
222 } | 223 } |
| 224 virtual bool chooseIconForFiles( |
| 225 const WebKit::WebVector<WebKit::WebString>& filenames, |
| 226 WebKit::WebIconLoadingCompletion* completion); |
223 virtual void didStartLoading(); | 227 virtual void didStartLoading(); |
224 virtual void didStopLoading(); | 228 virtual void didStopLoading(); |
225 virtual bool isSmartInsertDeleteEnabled(); | 229 virtual bool isSmartInsertDeleteEnabled(); |
226 virtual bool isSelectTrailingWhitespaceEnabled(); | 230 virtual bool isSelectTrailingWhitespaceEnabled(); |
227 virtual void setInputMethodEnabled(bool enabled); | 231 virtual void setInputMethodEnabled(bool enabled); |
228 virtual void didChangeSelection(bool is_selection_empty); | 232 virtual void didChangeSelection(bool is_selection_empty); |
229 virtual void didExecuteCommand(const WebKit::WebString& command_name); | 233 virtual void didExecuteCommand(const WebKit::WebString& command_name); |
230 virtual bool handleCurrentKeyboardEvent(); | 234 virtual bool handleCurrentKeyboardEvent(); |
231 virtual void spellCheck( | 235 virtual void spellCheck( |
232 const WebKit::WebString& text, int& offset, int& length); | 236 const WebKit::WebString& text, int& offset, int& length); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 const WebKit::WebConsoleMessage::Level&); | 714 const WebKit::WebConsoleMessage::Level&); |
711 void OnReservePageIDRange(int size_of_range); | 715 void OnReservePageIDRange(int size_of_range); |
712 | 716 |
713 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, | 717 void OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
714 const gfx::Point& screen_point, | 718 const gfx::Point& screen_point, |
715 bool ended, | 719 bool ended, |
716 WebKit::WebDragOperation drag_operation); | 720 WebKit::WebDragOperation drag_operation); |
717 void OnDragSourceSystemDragEnded(); | 721 void OnDragSourceSystemDragEnded(); |
718 void OnInstallMissingPlugin(); | 722 void OnInstallMissingPlugin(); |
719 void OnFileChooserResponse(const std::vector<FilePath>& paths); | 723 void OnFileChooserResponse(const std::vector<FilePath>& paths); |
| 724 void OnChooseIconForFilesResponse( |
| 725 int request_id, const std::vector<unsigned char>& icon_data); |
720 void OnEnableViewSourceMode(); | 726 void OnEnableViewSourceMode(); |
721 void OnEnablePreferredSizeChangedMode(); | 727 void OnEnablePreferredSizeChangedMode(); |
722 void OnDisableScrollbarsForSmallWindows( | 728 void OnDisableScrollbarsForSmallWindows( |
723 const gfx::Size& disable_scrollbars_size_limit); | 729 const gfx::Size& disable_scrollbars_size_limit); |
724 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 730 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
725 void OnMediaPlayerActionAt(const gfx::Point& location, | 731 void OnMediaPlayerActionAt(const gfx::Point& location, |
726 const WebKit::WebMediaPlayerAction& action); | 732 const WebKit::WebMediaPlayerAction& action); |
727 void OnNotifyRendererViewType(ViewType::Type view_type); | 733 void OnNotifyRendererViewType(ViewType::Type view_type); |
728 void OnUpdateBrowserWindowId(int window_id); | 734 void OnUpdateBrowserWindowId(int window_id); |
729 void OnExecuteCode(const ViewMsg_ExecuteCode_Params& params); | 735 void OnExecuteCode(const ViewMsg_ExecuteCode_Params& params); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 // render views. | 1045 // render views. |
1040 scoped_ptr<DevToolsClient> devtools_client_; | 1046 scoped_ptr<DevToolsClient> devtools_client_; |
1041 | 1047 |
1042 // The current and pending file chooser completion objects. If the queue is | 1048 // The current and pending file chooser completion objects. If the queue is |
1043 // nonempty, the first item represents the currently running file chooser | 1049 // nonempty, the first item represents the currently running file chooser |
1044 // callback, and the remaining elements are the other file chooser completion | 1050 // callback, and the remaining elements are the other file chooser completion |
1045 // still waiting to be run (in order). | 1051 // still waiting to be run (in order). |
1046 struct PendingFileChooser; | 1052 struct PendingFileChooser; |
1047 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; | 1053 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; |
1048 | 1054 |
| 1055 // How many times chooseIconForFiles() is called. |
| 1056 int choose_icon_for_files_counter_; |
| 1057 |
| 1058 // icon_for_files_counter_ -> WebIconLoadingCompletion* map. |
| 1059 typedef base::hash_map<int, WebKit::WebIconLoadingCompletion*> IconLoadingMap; |
| 1060 IconLoadingMap icon_loading_map_; |
| 1061 |
1049 int history_list_offset_; | 1062 int history_list_offset_; |
1050 int history_list_length_; | 1063 int history_list_length_; |
1051 | 1064 |
1052 // True if the page has any frame-level unload or beforeunload listeners. | 1065 // True if the page has any frame-level unload or beforeunload listeners. |
1053 bool has_unload_listener_; | 1066 bool has_unload_listener_; |
1054 | 1067 |
1055 // The total number of unrequested popups that exist and can be followed back | 1068 // The total number of unrequested popups that exist and can be followed back |
1056 // to a common opener. This count is shared among all RenderViews created | 1069 // to a common opener. This count is shared among all RenderViews created |
1057 // with createView(). All popups are treated as unrequested until | 1070 // with createView(). All popups are treated as unrequested until |
1058 // specifically instructed otherwise by the Browser process. | 1071 // specifically instructed otherwise by the Browser process. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 | 1229 |
1217 // Site isolation metrics flags. These are per-page-load counts, reset to 0 | 1230 // Site isolation metrics flags. These are per-page-load counts, reset to 0 |
1218 // in OnClosePage. | 1231 // in OnClosePage. |
1219 int cross_origin_access_count_; | 1232 int cross_origin_access_count_; |
1220 int same_origin_access_count_; | 1233 int same_origin_access_count_; |
1221 | 1234 |
1222 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1235 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1223 }; | 1236 }; |
1224 | 1237 |
1225 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1238 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |