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

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

Issue 10695066: Move SelectFileDialog implementation to ui/base/dialogs/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload because weirdness Created 8 years, 5 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
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 scoped_refptr<SelectFileDialogExtension> PendingDialog::Find(int32 tab_id) { 74 scoped_refptr<SelectFileDialogExtension> PendingDialog::Find(int32 tab_id) {
75 Map::const_iterator it = map_.find(tab_id); 75 Map::const_iterator it = map_.find(tab_id);
76 if (it == map_.end()) 76 if (it == map_.end())
77 return NULL; 77 return NULL;
78 return it->second; 78 return it->second;
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 /*
James Cook 2012/07/11 22:34:14 Did you mean to leave this in?
83 // Linking this implementation of SelectFileDialog::Create into the target 84 // Linking this implementation of SelectFileDialog::Create into the target
84 // selects FileManagerDialog as the dialog of choice. 85 // selects FileManagerDialog as the dialog of choice.
85 // TODO(jamescook): Move this into a new file shell_dialogs_chromeos.cc 86 // TODO(jamescook): Move this into a new file shell_dialogs_chromeos.cc
86 // TODO(jamescook): Change all instances of SelectFileDialog::Create to return 87 // TODO(jamescook): Change all instances of SelectFileDialog::Create to return
87 // scoped_refptr<SelectFileDialog> as object is ref-counted. 88 // scoped_refptr<SelectFileDialog> as object is ref-counted.
88 // static 89 // static
89 SelectFileDialog* SelectFileDialog::Create(Listener* listener, 90 SelectFileDialog* SelectFileDialog::Create(Listener* listener,
90 ui::SelectFilePolicy* policy) { 91 ui::SelectFilePolicy* policy) {
91 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 92 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
92 return SelectFileDialogExtension::Create(listener, policy); 93 return SelectFileDialogExtension::Create(listener, policy);
93 } 94 }
95 */
94 96
95 ///////////////////////////////////////////////////////////////////////////// 97 /////////////////////////////////////////////////////////////////////////////
96 98
97 // static 99 // static
98 SelectFileDialogExtension* SelectFileDialogExtension::Create( 100 SelectFileDialogExtension* SelectFileDialogExtension::Create(
99 Listener* listener, 101 Listener* listener,
100 ui::SelectFilePolicy* policy) { 102 ui::SelectFilePolicy* policy) {
101 return new SelectFileDialogExtension(listener, policy); 103 return new SelectFileDialogExtension(listener, policy);
102 } 104 }
103 105
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 345 }
344 346
345 // Connect our listener to FileDialogFunction's per-tab callbacks. 347 // Connect our listener to FileDialogFunction's per-tab callbacks.
346 AddPending(tab_id); 348 AddPending(tab_id);
347 349
348 extension_dialog_ = dialog; 350 extension_dialog_ = dialog;
349 params_ = params; 351 params_ = params;
350 tab_id_ = tab_id; 352 tab_id_ = tab_id;
351 owner_window_ = owner_window; 353 owner_window_ = owner_window;
352 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698