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

Side by Side Diff: chrome/browser/extensions/extension_view_host.cc

Issue 2059533002: Change WebContentsDelegate::RunFileChooser to be frame based. (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
« no previous file with comments | « chrome/browser/extensions/extension_view_host.h ('k') | chrome/browser/file_select_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/extensions/extension_view_host.h" 5 #include "chrome/browser/extensions/extension_view_host.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 WebContents* web_contents, 213 WebContents* web_contents,
214 SkColor initial_color, 214 SkColor initial_color,
215 const std::vector<content::ColorSuggestion>& suggestions) { 215 const std::vector<content::ColorSuggestion>& suggestions) {
216 // Similar to the file chooser below, opening a color chooser requires a 216 // Similar to the file chooser below, opening a color chooser requires a
217 // visible <input> element to click on. Therefore this code only exists for 217 // visible <input> element to click on. Therefore this code only exists for
218 // extensions with a view. 218 // extensions with a view.
219 return chrome::ShowColorChooser(web_contents, initial_color); 219 return chrome::ShowColorChooser(web_contents, initial_color);
220 } 220 }
221 221
222 void ExtensionViewHost::RunFileChooser( 222 void ExtensionViewHost::RunFileChooser(
223 WebContents* tab, 223 content::RenderFrameHost* render_frame_host,
224 const content::FileChooserParams& params) { 224 const content::FileChooserParams& params) {
225 // For security reasons opening a file picker requires a visible <input> 225 // For security reasons opening a file picker requires a visible <input>
226 // element to click on, so this code only exists for extensions with a view. 226 // element to click on, so this code only exists for extensions with a view.
227 FileSelectHelper::RunFileChooser(tab, params); 227 FileSelectHelper::RunFileChooser(render_frame_host, params);
228 } 228 }
229 229
230 230
231 void ExtensionViewHost::ResizeDueToAutoResize(WebContents* source, 231 void ExtensionViewHost::ResizeDueToAutoResize(WebContents* source,
232 const gfx::Size& new_size) { 232 const gfx::Size& new_size) {
233 view_->ResizeDueToAutoResize(source, new_size); 233 view_->ResizeDueToAutoResize(source, new_size);
234 } 234 }
235 235
236 // content::WebContentsObserver overrides: 236 // content::WebContentsObserver overrides:
237 237
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 const content::NotificationSource& source, 299 const content::NotificationSource& source,
300 const content::NotificationDetails& details) { 300 const content::NotificationDetails& details) {
301 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY); 301 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY);
302 DCHECK(ExtensionSystem::Get(browser_context()) 302 DCHECK(ExtensionSystem::Get(browser_context())
303 ->runtime_data() 303 ->runtime_data()
304 ->IsBackgroundPageReady(extension())); 304 ->IsBackgroundPageReady(extension()));
305 LoadInitialURL(); 305 LoadInitialURL();
306 } 306 }
307 307
308 } // namespace extensions 308 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_view_host.h ('k') | chrome/browser/file_select_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698