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

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

Issue 10824204: Move small c/b/extensions classes into extensions namespace no.2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 profile_ = tab->profile(); 270 profile_ = tab->profile();
271 } else if (owner_window) { 271 } else if (owner_window) {
272 // If an owner_window was supplied but we couldn't find a browser, this 272 // If an owner_window was supplied but we couldn't find a browser, this
273 // could be for a shell window. 273 // could be for a shell window.
274 // TODO(benwells): Find a better way to get a shell window from a native 274 // TODO(benwells): Find a better way to get a shell window from a native
275 // window. 275 // window.
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 ShellWindowRegistry* registry = ShellWindowRegistry::Get(*i); 280 extensions::ShellWindowRegistry* registry =
281 extensions::ShellWindowRegistry::Get(*i);
281 DCHECK(registry); 282 DCHECK(registry);
282 ShellWindow* shell_window = registry->GetShellWindowForNativeWindow( 283 ShellWindow* shell_window = registry->GetShellWindowForNativeWindow(
283 owner_window); 284 owner_window);
284 if (shell_window) { 285 if (shell_window) {
285 base_window = shell_window; 286 base_window = shell_window;
286 tab = shell_window->tab_contents(); 287 tab = shell_window->tab_contents();
287 profile_ = *i; 288 profile_ = *i;
288 break; 289 break;
289 } 290 }
290 } 291 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 kFileManagerMinimumHeight); 341 kFileManagerMinimumHeight);
341 342
342 // Connect our listener to FileDialogFunction's per-tab callbacks. 343 // Connect our listener to FileDialogFunction's per-tab callbacks.
343 AddPending(tab_id); 344 AddPending(tab_id);
344 345
345 extension_dialog_ = dialog; 346 extension_dialog_ = dialog;
346 params_ = params; 347 params_ = params;
347 tab_id_ = tab_id; 348 tab_id_ = tab_id;
348 owner_window_ = owner_window; 349 owner_window_ = owner_window;
349 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698