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

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

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void SelectFileDialogExtension::OnFileSelectionCanceled(int32 tab_id) { 182 void SelectFileDialogExtension::OnFileSelectionCanceled(int32 tab_id) {
183 scoped_refptr<SelectFileDialogExtension> dialog = 183 scoped_refptr<SelectFileDialogExtension> dialog =
184 PendingDialog::GetInstance()->Find(tab_id); 184 PendingDialog::GetInstance()->Find(tab_id);
185 if (!dialog) 185 if (!dialog)
186 return; 186 return;
187 dialog->selection_type_ = CANCEL; 187 dialog->selection_type_ = CANCEL;
188 dialog->selection_files_.clear(); 188 dialog->selection_files_.clear();
189 dialog->selection_index_ = 0; 189 dialog->selection_index_ = 0;
190 } 190 }
191 191
192 RenderViewHost* SelectFileDialogExtension::GetRenderViewHost() { 192 content::RenderViewHost* SelectFileDialogExtension::GetRenderViewHost() {
193 if (extension_dialog_) 193 if (extension_dialog_)
194 return extension_dialog_->host()->render_view_host(); 194 return extension_dialog_->host()->render_view_host();
195 return NULL; 195 return NULL;
196 } 196 }
197 197
198 void SelectFileDialogExtension::NotifyListener() { 198 void SelectFileDialogExtension::NotifyListener() {
199 if (!listener_) 199 if (!listener_)
200 return; 200 return;
201 switch (selection_type_) { 201 switch (selection_type_) {
202 case CANCEL: 202 case CANCEL:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 // Connect our listener to FileDialogFunction's per-tab callbacks. 290 // Connect our listener to FileDialogFunction's per-tab callbacks.
291 AddPending(tab_id); 291 AddPending(tab_id);
292 292
293 extension_dialog_ = dialog; 293 extension_dialog_ = dialog;
294 params_ = params; 294 params_ = params;
295 tab_id_ = tab_id; 295 tab_id_ = tab_id;
296 owner_window_ = owner_window; 296 owner_window_ = owner_window;
297 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698