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

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

Issue 10698168: Part 3 of Move SelectFileDialog implementation to ui/base/dialogs/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More namespace to force rebuild. 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 // Linking this implementation of SelectFileDialog::Create into the target 83 /////////////////////////////////////////////////////////////////////////////
84 // selects FileManagerDialog as the dialog of choice. 84
85 // TODO(jamescook): Move this into a new file shell_dialogs_chromeos.cc 85 // TODO(jamescook): Move this into a new file shell_dialogs_chromeos.cc
86 // TODO(jamescook): Change all instances of SelectFileDialog::Create to return 86 // TODO(jamescook): Change all instances of SelectFileDialog::Create to return
87 // scoped_refptr<SelectFileDialog> as object is ref-counted. 87 // scoped_refptr<SelectFileDialog> as object is ref-counted.
88 // static 88 // static
89 SelectFileDialog* SelectFileDialog::Create(Listener* listener,
90 ui::SelectFilePolicy* policy) {
91 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
92 return SelectFileDialogExtension::Create(listener, policy);
93 }
94
95 /////////////////////////////////////////////////////////////////////////////
96
97 // static
98 SelectFileDialogExtension* SelectFileDialogExtension::Create( 89 SelectFileDialogExtension* SelectFileDialogExtension::Create(
99 Listener* listener, 90 Listener* listener,
100 ui::SelectFilePolicy* policy) { 91 ui::SelectFilePolicy* policy) {
101 return new SelectFileDialogExtension(listener, policy); 92 return new SelectFileDialogExtension(listener, policy);
102 } 93 }
103 94
104 SelectFileDialogExtension::SelectFileDialogExtension( 95 SelectFileDialogExtension::SelectFileDialogExtension(
105 Listener* listener, 96 Listener* listener,
106 ui::SelectFilePolicy* policy) 97 ui::SelectFilePolicy* policy)
107 : SelectFileDialog(listener, policy), 98 : SelectFileDialog(listener, policy),
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 334 }
344 335
345 // Connect our listener to FileDialogFunction's per-tab callbacks. 336 // Connect our listener to FileDialogFunction's per-tab callbacks.
346 AddPending(tab_id); 337 AddPending(tab_id);
347 338
348 extension_dialog_ = dialog; 339 extension_dialog_ = dialog;
349 params_ = params; 340 params_ = params;
350 tab_id_ = tab_id; 341 tab_id_ = tab_id;
351 owner_window_ = owner_window; 342 owner_window_ = owner_window;
352 } 343 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_aura.cc ('k') | chrome/browser/ui/views/select_file_dialog_extension_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698