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

Side by Side Diff: chrome/browser/ui/views/select_file_dialog_extension.cc

Issue 10825240: Refactor ShellWindow to separate platform-specific code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.cc ('k') | chrome/chrome_browser.gypi » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/select_file_dialog_extension.h" 5 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 std::vector<Profile*> profiles = 276 std::vector<Profile*> profiles =
277 g_browser_process->profile_manager()->GetLoadedProfiles(); 277 g_browser_process->profile_manager()->GetLoadedProfiles();
278 for (std::vector<Profile*>::const_iterator i(profiles.begin()); 278 for (std::vector<Profile*>::const_iterator i(profiles.begin());
279 i < profiles.end(); ++i) { 279 i < profiles.end(); ++i) {
280 extensions::ShellWindowRegistry* registry = 280 extensions::ShellWindowRegistry* registry =
281 extensions::ShellWindowRegistry::Get(*i); 281 extensions::ShellWindowRegistry::Get(*i);
282 DCHECK(registry); 282 DCHECK(registry);
283 ShellWindow* shell_window = registry->GetShellWindowForNativeWindow( 283 ShellWindow* shell_window = registry->GetShellWindowForNativeWindow(
284 owner_window); 284 owner_window);
285 if (shell_window) { 285 if (shell_window) {
286 base_window = shell_window; 286 base_window = shell_window->GetBaseWindow();
287 tab = shell_window->tab_contents(); 287 tab = shell_window->tab_contents();
288 profile_ = *i; 288 profile_ = *i;
289 break; 289 break;
290 } 290 }
291 } 291 }
292 } 292 }
293 293
294 if (!base_window) { 294 if (!base_window) {
295 NOTREACHED() << "Can't find owning window."; 295 NOTREACHED() << "Can't find owning window.";
296 return; 296 return;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 kFileManagerMinimumHeight); 341 kFileManagerMinimumHeight);
342 342
343 // Connect our listener to FileDialogFunction's per-tab callbacks. 343 // Connect our listener to FileDialogFunction's per-tab callbacks.
344 AddPending(tab_id); 344 AddPending(tab_id);
345 345
346 extension_dialog_ = dialog; 346 extension_dialog_ = dialog;
347 params_ = params; 347 params_ = params;
348 tab_id_ = tab_id; 348 tab_id_ = tab_id;
349 owner_window_ = owner_window; 349 owner_window_ = owner_window;
350 } 350 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698