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

Side by Side Diff: chrome/browser/ui/webui/options2/media_galleries_handler.cc

Issue 10820034: Remove redirection header and add "ui::" before all SelectFileDialog usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reuploading for different try run. 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 | 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/webui/options2/media_galleries_handler.h" 5 #include "chrome/browser/ui/webui/options2/media_galleries_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/media_gallery/media_galleries_preferences.h" 8 #include "chrome/browser/media_gallery/media_galleries_preferences.h"
9 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h" 9 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void MediaGalleriesHandler::OnGalleriesChanged() { 70 void MediaGalleriesHandler::OnGalleriesChanged() {
71 Profile* profile = Profile::FromWebUI(web_ui()); 71 Profile* profile = Profile::FromWebUI(web_ui());
72 const ListValue* list = profile->GetPrefs()->GetList( 72 const ListValue* list = profile->GetPrefs()->GetList(
73 prefs::kMediaGalleriesRememberedGalleries); 73 prefs::kMediaGalleriesRememberedGalleries);
74 web_ui()->CallJavascriptFunction( 74 web_ui()->CallJavascriptFunction(
75 "options.MediaGalleriesManager.setAvailableMediaGalleries", *list); 75 "options.MediaGalleriesManager.setAvailableMediaGalleries", *list);
76 } 76 }
77 77
78 void MediaGalleriesHandler::HandleAddNewGallery(const base::ListValue* args) { 78 void MediaGalleriesHandler::HandleAddNewGallery(const base::ListValue* args) {
79 SelectFileDialog* dialog = SelectFileDialog::Create( 79 ui::SelectFileDialog* dialog = ui::SelectFileDialog::Create(
80 this, 80 this,
81 new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 81 new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
82 dialog->SelectFile(SelectFileDialog::SELECT_FOLDER, 82 dialog->SelectFile(ui::SelectFileDialog::SELECT_FOLDER,
83 string16(), // TODO(estade): a name for the dialog? 83 string16(), // TODO(estade): a name for the dialog?
84 FilePath(), 84 FilePath(),
85 NULL, 0, 85 NULL, 0,
86 FilePath::StringType(), 86 FilePath::StringType(),
87 web_ui()->GetWebContents()->GetView()-> 87 web_ui()->GetWebContents()->GetView()->
88 GetTopLevelNativeWindow(), 88 GetTopLevelNativeWindow(),
89 NULL); 89 NULL);
90 } 90 }
91 91
92 void MediaGalleriesHandler::HandleForgetGallery(const base::ListValue* args) { 92 void MediaGalleriesHandler::HandleForgetGallery(const base::ListValue* args) {
(...skipping 21 matching lines...) Expand all
114 if (type == chrome::NOTIFICATION_PREF_CHANGED && 114 if (type == chrome::NOTIFICATION_PREF_CHANGED &&
115 *content::Details<std::string>(details).ptr() == 115 *content::Details<std::string>(details).ptr() ==
116 prefs::kMediaGalleriesRememberedGalleries) { 116 prefs::kMediaGalleriesRememberedGalleries) {
117 OnGalleriesChanged(); 117 OnGalleriesChanged();
118 } else { 118 } else {
119 NOTREACHED(); 119 NOTREACHED();
120 } 120 }
121 } 121 }
122 122
123 } // namespace options2 123 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698