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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 2050623005: Move file chooser from RenderView(Host) to RenderFrame(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on reviews. Created 4 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 class RenderFrameObserver; 145 class RenderFrameObserver;
146 class RenderViewImpl; 146 class RenderViewImpl;
147 class RenderWidget; 147 class RenderWidget;
148 class RenderWidgetFullscreenPepper; 148 class RenderWidgetFullscreenPepper;
149 class ResourceRequestBody; 149 class ResourceRequestBody;
150 class ScreenOrientationDispatcher; 150 class ScreenOrientationDispatcher;
151 class UserMediaClientImpl; 151 class UserMediaClientImpl;
152 class WakeLockDispatcher; 152 class WakeLockDispatcher;
153 struct CommonNavigationParams; 153 struct CommonNavigationParams;
154 struct CustomContextMenuContext; 154 struct CustomContextMenuContext;
155 struct FileChooserFileInfo;
156 struct FileChooserParams;
155 struct FrameReplicationState; 157 struct FrameReplicationState;
156 struct NavigationParams; 158 struct NavigationParams;
157 struct RequestNavigationParams; 159 struct RequestNavigationParams;
158 struct ResourceResponseHead; 160 struct ResourceResponseHead;
159 struct StartNavigationParams; 161 struct StartNavigationParams;
160 struct StreamOverrideParameters; 162 struct StreamOverrideParameters;
161 163
162 class CONTENT_EXPORT RenderFrameImpl 164 class CONTENT_EXPORT RenderFrameImpl
163 : public RenderFrame, 165 : public RenderFrame,
164 NON_EXPORTED_BASE(public blink::WebFrameClient), 166 NON_EXPORTED_BASE(public blink::WebFrameClient),
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 blink::WebColorChooser* createColorChooser( 536 blink::WebColorChooser* createColorChooser(
535 blink::WebColorChooserClient* client, 537 blink::WebColorChooserClient* client,
536 const blink::WebColor& initial_color, 538 const blink::WebColor& initial_color,
537 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override; 539 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override;
538 void runModalAlertDialog(const blink::WebString& message) override; 540 void runModalAlertDialog(const blink::WebString& message) override;
539 bool runModalConfirmDialog(const blink::WebString& message) override; 541 bool runModalConfirmDialog(const blink::WebString& message) override;
540 bool runModalPromptDialog(const blink::WebString& message, 542 bool runModalPromptDialog(const blink::WebString& message,
541 const blink::WebString& default_value, 543 const blink::WebString& default_value,
542 blink::WebString* actual_value) override; 544 blink::WebString* actual_value) override;
543 bool runModalBeforeUnloadDialog(bool is_reload) override; 545 bool runModalBeforeUnloadDialog(bool is_reload) override;
546 bool runFileChooser(
547 const blink::WebFileChooserParams& params,
548 blink::WebFileChooserCompletion* chooser_completion) override;
544 void showContextMenu(const blink::WebContextMenuData& data) override; 549 void showContextMenu(const blink::WebContextMenuData& data) override;
545 void willSendRequest(blink::WebLocalFrame* frame, 550 void willSendRequest(blink::WebLocalFrame* frame,
546 unsigned identifier, 551 unsigned identifier,
547 blink::WebURLRequest& request, 552 blink::WebURLRequest& request,
548 const blink::WebURLResponse& redirect_response) override; 553 const blink::WebURLResponse& redirect_response) override;
549 void didReceiveResponse(unsigned identifier, 554 void didReceiveResponse(unsigned identifier,
550 const blink::WebURLResponse& response) override; 555 const blink::WebURLResponse& response) override;
551 void didLoadResourceFromMemoryCache( 556 void didLoadResourceFromMemoryCache(
552 const blink::WebURLRequest& request, 557 const blink::WebURLRequest& request,
553 const blink::WebURLResponse& response) override; 558 const blink::WebURLResponse& response) override;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 const std::map<GURL, base::FilePath>& url_to_local_path, 820 const std::map<GURL, base::FilePath>& url_to_local_path,
816 const std::map<int, base::FilePath>& frame_routing_id_to_local_path); 821 const std::map<int, base::FilePath>& frame_routing_id_to_local_path);
817 void OnSerializeAsMHTML(const FrameMsg_SerializeAsMHTML_Params& params); 822 void OnSerializeAsMHTML(const FrameMsg_SerializeAsMHTML_Params& params);
818 void OnFind(int request_id, 823 void OnFind(int request_id,
819 const base::string16& search_text, 824 const base::string16& search_text,
820 const blink::WebFindOptions& options); 825 const blink::WebFindOptions& options);
821 void OnClearActiveFindMatch(); 826 void OnClearActiveFindMatch();
822 void OnStopFinding(StopFindAction action); 827 void OnStopFinding(StopFindAction action);
823 void OnEnableViewSourceMode(); 828 void OnEnableViewSourceMode();
824 void OnSuppressFurtherDialogs(); 829 void OnSuppressFurtherDialogs();
830 void OnFileChooserResponse(
831 const std::vector<content::FileChooserFileInfo>& files);
825 #if defined(OS_ANDROID) 832 #if defined(OS_ANDROID)
826 void OnActivateNearestFindResult(int request_id, float x, float y); 833 void OnActivateNearestFindResult(int request_id, float x, float y);
827 void OnGetNearestFindResult(int request_id, float x, float y); 834 void OnGetNearestFindResult(int request_id, float x, float y);
828 void OnFindMatchRects(int current_version); 835 void OnFindMatchRects(int current_version);
829 #endif 836 #endif
830 837
831 #if defined(USE_EXTERNAL_POPUP_MENU) 838 #if defined(USE_EXTERNAL_POPUP_MENU)
832 #if defined(OS_MACOSX) 839 #if defined(OS_MACOSX)
833 void OnSelectPopupMenuItem(int selected_index); 840 void OnSelectPopupMenuItem(int selected_index);
834 #else 841 #else
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 // TODO(varunjain): delete this method once we figure out how to keep 893 // TODO(varunjain): delete this method once we figure out how to keep
887 // selection handles in sync with the webpage. 894 // selection handles in sync with the webpage.
888 void SyncSelectionIfRequired(); 895 void SyncSelectionIfRequired();
889 896
890 bool RunJavaScriptMessage(JavaScriptMessageType type, 897 bool RunJavaScriptMessage(JavaScriptMessageType type,
891 const base::string16& message, 898 const base::string16& message,
892 const base::string16& default_value, 899 const base::string16& default_value,
893 const GURL& frame_url, 900 const GURL& frame_url,
894 base::string16* result); 901 base::string16* result);
895 902
903 // Adds the given file chooser request to the file_chooser_completion_ queue
904 // (see that var for more) and requests the chooser be displayed if there are
905 // no other waiting items in the queue.
906 //
907 // Returns true if the chooser was successfully scheduled. False means we
908 // didn't schedule anything.
909 bool ScheduleFileChooser(const FileChooserParams& params,
910 blink::WebFileChooserCompletion* completion);
911
896 // Loads the appropriate error page for the specified failure into the frame. 912 // Loads the appropriate error page for the specified failure into the frame.
897 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, 913 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request,
898 const blink::WebURLError& error, 914 const blink::WebURLError& error,
899 bool replace); 915 bool replace);
900 916
901 void HandleJavascriptExecutionResult(const base::string16& javascript, 917 void HandleJavascriptExecutionResult(const base::string16& javascript,
902 int id, 918 int id,
903 bool notify_result, 919 bool notify_result,
904 v8::Local<v8::Value> result); 920 v8::Local<v8::Value> result);
905 921
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 blink::WebEffectiveConnectionType effective_connection_type_; 1238 blink::WebEffectiveConnectionType effective_connection_type_;
1223 1239
1224 // Whether or not this RenderFrame is currently pasting. 1240 // Whether or not this RenderFrame is currently pasting.
1225 bool is_pasting_; 1241 bool is_pasting_;
1226 1242
1227 // Whether we must stop creating nested message loops for modal dialogs. This 1243 // Whether we must stop creating nested message loops for modal dialogs. This
1228 // is necessary because modal dialogs have a ScopedPageLoadDeferrer on the 1244 // is necessary because modal dialogs have a ScopedPageLoadDeferrer on the
1229 // stack that interferes with swapping out. 1245 // stack that interferes with swapping out.
1230 bool suppress_further_dialogs_; 1246 bool suppress_further_dialogs_;
1231 1247
1248 // The current and pending file chooser completion objects. If the queue is
1249 // nonempty, the first item represents the currently running file chooser
1250 // callback, and the remaining elements are the other file chooser completion
1251 // still waiting to be run (in order).
1252 struct PendingFileChooser;
1253 std::deque<std::unique_ptr<PendingFileChooser>> file_chooser_completions_;
1254
1232 #if defined(USE_EXTERNAL_POPUP_MENU) 1255 #if defined(USE_EXTERNAL_POPUP_MENU)
1233 // The external popup for the currently showing select popup. 1256 // The external popup for the currently showing select popup.
1234 std::unique_ptr<ExternalPopupMenu> external_popup_menu_; 1257 std::unique_ptr<ExternalPopupMenu> external_popup_menu_;
1235 #endif 1258 #endif
1236 1259
1237 FrameBlameContext* blame_context_; // Not owned. 1260 FrameBlameContext* blame_context_; // Not owned.
1238 1261
1239 // Plugins ------------------------------------------------------------------- 1262 // Plugins -------------------------------------------------------------------
1240 #if defined(ENABLE_PLUGINS) 1263 #if defined(ENABLE_PLUGINS)
1241 typedef std::set<PepperPluginInstanceImpl*> PepperPluginSet; 1264 typedef std::set<PepperPluginInstanceImpl*> PepperPluginSet;
(...skipping 10 matching lines...) Expand all
1252 #endif 1275 #endif
1253 1276
1254 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1277 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1255 1278
1256 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1279 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1257 }; 1280 };
1258 1281
1259 } // namespace content 1282 } // namespace content
1260 1283
1261 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1284 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_file_chooser_host_unittest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698