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

Unified Diff: chrome/browser/intents/native_services.cc

Issue 11071005: Add native file picker impl using SelectFileDialog. (Closed) Base URL: http://git.chromium.org/chromium/src.git@filePicker
Patch Set: Remove ifdefs for VIEWS toolkit. Created 8 years, 2 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/intents/native_services.cc
diff --git a/chrome/browser/intents/native_services.cc b/chrome/browser/intents/native_services.cc
index 7ed96868ad216713e7e338a097ef47d09bd71efe..c5f9062f6dc5694ea38189aafe406c8d17855b76 100644
--- a/chrome/browser/intents/native_services.cc
+++ b/chrome/browser/intents/native_services.cc
@@ -29,7 +29,6 @@ void NativeServiceRegistry::GetSupportedServices(
switches::kWebIntentsNativeServicesEnabled))
return;
-#if defined(TOOLKIT_VIEWS)
if (EqualsASCII(action, web_intents::kActionPick)) {
// File picker registrations.
webkit_glue::WebIntentServiceData service(
@@ -42,20 +41,18 @@ void NativeServiceRegistry::GetSupportedServices(
services->push_back(service);
}
-#endif
}
NativeServiceFactory::NativeServiceFactory() {}
IntentServiceHost* NativeServiceFactory::CreateServiceInstance(
const GURL& service_url,
- const webkit_glue::WebIntentData& intent) {
+ const webkit_glue::WebIntentData& intent,
+ content::WebContents* web_contents) {
-#if defined(TOOLKIT_VIEWS)
if (service_url.spec() == kNativeFilePickerUrl) {
- return FilePickerFactory::CreateServiceInstance(intent);
+ return FilePickerFactory::CreateServiceInstance(web_contents, intent);
}
-#endif
return NULL; // couldn't create instance
}

Powered by Google App Engine
This is Rietveld 408576698