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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 11881055: Simplify WebUI data sources. Currently WebUI data sources implement a URLDataSourceDelegate interfa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix issue in about_ui exposed by cros tests Created 7 years, 11 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/chromeos/extensions/file_browser_private_api.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <sys/statvfs.h> 8 #include <sys/statvfs.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <utime.h> 10 #include <utime.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "chrome/browser/google_apis/drive_service_interface.h" 49 #include "chrome/browser/google_apis/drive_service_interface.h"
50 #include "chrome/browser/google_apis/gdata_wapi_parser.h" 50 #include "chrome/browser/google_apis/gdata_wapi_parser.h"
51 #include "chrome/browser/google_apis/operation_registry.h" 51 #include "chrome/browser/google_apis/operation_registry.h"
52 #include "chrome/browser/google_apis/time_util.h" 52 #include "chrome/browser/google_apis/time_util.h"
53 #include "chrome/browser/intents/web_intents_util.h" 53 #include "chrome/browser/intents/web_intents_util.h"
54 #include "chrome/browser/profiles/profile.h" 54 #include "chrome/browser/profiles/profile.h"
55 #include "chrome/browser/ui/browser.h" 55 #include "chrome/browser/ui/browser.h"
56 #include "chrome/browser/ui/browser_window.h" 56 #include "chrome/browser/ui/browser_window.h"
57 #include "chrome/browser/ui/views/select_file_dialog_extension.h" 57 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
58 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 58 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
59 #include "chrome/browser/ui/webui/web_ui_util.h"
59 #include "chrome/common/extensions/extension.h" 60 #include "chrome/common/extensions/extension.h"
60 #include "chrome/common/extensions/extension_constants.h" 61 #include "chrome/common/extensions/extension_constants.h"
61 #include "chrome/common/extensions/extension_icon_set.h" 62 #include "chrome/common/extensions/extension_icon_set.h"
62 #include "chrome/common/extensions/extension_manifest_constants.h" 63 #include "chrome/common/extensions/extension_manifest_constants.h"
63 #include "chrome/common/extensions/web_intents_handler.h" 64 #include "chrome/common/extensions/web_intents_handler.h"
64 #include "chrome/common/pref_names.h" 65 #include "chrome/common/pref_names.h"
65 #include "chromeos/disks/disk_mount_manager.h" 66 #include "chromeos/disks/disk_mount_manager.h"
66 #include "content/public/browser/child_process_security_policy.h" 67 #include "content/public/browser/child_process_security_policy.h"
67 #include "content/public/browser/render_process_host.h" 68 #include "content/public/browser/render_process_host.h"
68 #include "content/public/browser/render_view_host.h" 69 #include "content/public/browser/render_view_host.h"
(...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 SET_STRING(IDS_FILE_BROWSER, SPACE_AVAILABLE); 2204 SET_STRING(IDS_FILE_BROWSER, SPACE_AVAILABLE);
2204 SET_STRING(IDS_FILE_BROWSER, WAITING_FOR_SPACE_INFO); 2205 SET_STRING(IDS_FILE_BROWSER, WAITING_FOR_SPACE_INFO);
2205 SET_STRING(IDS_FILE_BROWSER, FAILED_SPACE_INFO); 2206 SET_STRING(IDS_FILE_BROWSER, FAILED_SPACE_INFO);
2206 2207
2207 SET_STRING(IDS_FILE_BROWSER, HELP_LINK_LABEL); 2208 SET_STRING(IDS_FILE_BROWSER, HELP_LINK_LABEL);
2208 #undef SET_STRING 2209 #undef SET_STRING
2209 2210
2210 dict->SetBoolean("PDF_VIEW_ENABLED", 2211 dict->SetBoolean("PDF_VIEW_ENABLED",
2211 file_manager_util::ShouldBeOpenedWithPdfPlugin(profile(), ".pdf")); 2212 file_manager_util::ShouldBeOpenedWithPdfPlugin(profile(), ".pdf"));
2212 2213
2213 URLDataSource::SetFontAndTextDirection(dict); 2214 web_ui_util::SetFontAndTextDirection(dict);
2214 2215
2215 drive::DriveSystemService* system_service = 2216 drive::DriveSystemService* system_service =
2216 drive::DriveSystemServiceFactory::GetForProfile(profile_); 2217 drive::DriveSystemServiceFactory::GetForProfile(profile_);
2217 dict->SetBoolean("ENABLE_GDATA", system_service != NULL); 2218 dict->SetBoolean("ENABLE_GDATA", system_service != NULL);
2218 2219
2219 #if defined(USE_ASH) 2220 #if defined(USE_ASH)
2220 dict->SetBoolean("ASH", true); 2221 dict->SetBoolean("ASH", true);
2221 #else 2222 #else
2222 dict->SetBoolean("ASH", false); 2223 dict->SetBoolean("ASH", false);
2223 #endif 2224 #endif
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
3033 // Keep the refcount until the zipping is complete on utility process. 3034 // Keep the refcount until the zipping is complete on utility process.
3034 AddRef(); 3035 AddRef();
3035 return true; 3036 return true;
3036 } 3037 }
3037 3038
3038 void ZipSelectionFunction::OnZipDone(bool success) { 3039 void ZipSelectionFunction::OnZipDone(bool success) {
3039 SetResult(new base::FundamentalValue(success)); 3040 SetResult(new base::FundamentalValue(success));
3040 SendResponse(true); 3041 SendResponse(true);
3041 Release(); 3042 Release();
3042 } 3043 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/wallpaper_private_api.cc » ('j') | content/public/browser/url_data_source.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698