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

Unified Diff: chrome/browser/ui/views/select_file_dialog.cc

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: White spaces Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/select_file_dialog.cc
diff --git a/chrome/browser/ui/views/select_file_dialog.cc b/chrome/browser/ui/views/select_file_dialog.cc
index 3673abdaa39c047e85eac7793eb80a511b325712..d125cc27a332dd25b05c48e477592837731cdfdf 100644
--- a/chrome/browser/ui/views/select_file_dialog.cc
+++ b/chrome/browser/ui/views/select_file_dialog.cc
@@ -33,7 +33,7 @@ const int kSaveCompletePageIndex = 2;
} // namespace
// Implementation of SelectFileDialog that shows an UI for choosing a file
-// or folder using FileBrowseUI.
+// or folder.
class SelectFileDialogImpl : public SelectFileDialog {
public:
explicit SelectFileDialogImpl(Listener* listener);
@@ -325,8 +325,12 @@ string16 SelectFileDialogImpl::FileBrowseDelegate::GetDialogTitle() const {
}
GURL SelectFileDialogImpl::FileBrowseDelegate::GetDialogContentURL() const {
+#if defined(USE_AURA)
+ // TODO(saintlou): The current SelectFileDialogImpl assumes chromeos==1
+ std::string url_string;
+#else
std::string url_string(chrome::kChromeUIFileBrowseURL);
-
+#endif
return GURL(url_string);
}
@@ -343,6 +347,11 @@ void SelectFileDialogImpl::FileBrowseDelegate::GetDialogSize(
}
std::string SelectFileDialogImpl::FileBrowseDelegate::GetDialogArgs() const {
+#if defined(USE_AURA)
+ // TODO(saintlou): The current SelectFileDialogImpl does not seem to work
+ // when chromeos==0.
oshima 2011/09/19 15:52:39 Shouldn't this code be harmless with the empty URL
+ return std::string();
+#else
// SelectFile inputs as json.
// {
// "type" : "open", // (or "open_multiple", "save", "folder"
@@ -424,6 +433,7 @@ std::string SelectFileDialogImpl::FileBrowseDelegate::GetDialogArgs() const {
exts_list.c_str(),
desc_list.c_str(),
file_type_index_);
+#endif
}
void SelectFileDialogImpl::FileBrowseDelegate::OnDialogClosed(
@@ -445,6 +455,9 @@ void SelectFileDialogImpl::FileBrowseDelegateHandler::RegisterMessages() {
void SelectFileDialogImpl::FileBrowseDelegateHandler::HandleSetDialogTitle(
const ListValue* args) {
+#if !defined(USE_AURA)
+ // TODO(saintlou): The current SelectFileDialogImpl does not seem to work
+ // when chromeos==0.
std::wstring new_title = UTF16ToWideHack(ExtractStringValue(args));
if (new_title != delegate_->title_) {
delegate_->title_ = new_title;
@@ -463,4 +476,5 @@ void SelectFileDialogImpl::FileBrowseDelegateHandler::HandleSetDialogTitle(
containing_view->GetWindow()->UpdateWindowTitle();
containing_view->GetWindow()->non_client_view()->SchedulePaint();
}
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698