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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_util.h

Issue 22165002: Change the meaning of SelectFileDialog.support_drive: it means Drive-aware callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix (#2). Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file provides utility functions for fileBrowserPrivate API. 5 // This file provides utility functions for fileBrowserPrivate API.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // "/special/drive/foo/bar.txt". 49 // "/special/drive/foo/bar.txt".
50 base::FilePath GetLocalPathFromURL( 50 base::FilePath GetLocalPathFromURL(
51 content::RenderViewHost* render_view_host, 51 content::RenderViewHost* render_view_host,
52 Profile* profile, 52 Profile* profile,
53 const GURL& url); 53 const GURL& url);
54 54
55 // The callback type is used for GetSelectedFileInfo(). 55 // The callback type is used for GetSelectedFileInfo().
56 typedef base::Callback<void(const std::vector<ui::SelectedFileInfo>&)> 56 typedef base::Callback<void(const std::vector<ui::SelectedFileInfo>&)>
57 GetSelectedFileInfoCallback; 57 GetSelectedFileInfoCallback;
58 58
59 // Option enum to control how to set the ui::SelectedFileInfo::local_path
60 // fields in GetSelectedFileInfo() for Drive files.
61 // NO_LOCAL_PATH_RESOLUTION:
62 // Does nothing. Set the Drive path as-is.
63 // NEED_LOCAL_PATH_FOR_OPENING:
64 // Sets the path to a local cache file.
65 // NEED_LOCAL_PATH_FOR_SAVING:
66 // Sets the path to a local cache file. Modification to the file is monitored
67 // and automatically synced to the Drive server.
68 enum GetSelectedFileInfoLocalPathOption {
69 NO_LOCAL_PATH_RESOLUTION,
70 NEED_LOCAL_PATH_FOR_OPENING,
71 NEED_LOCAL_PATH_FOR_SAVING,
72 };
73
59 // Gets the information for |file_urls|. 74 // Gets the information for |file_urls|.
60 void GetSelectedFileInfo(content::RenderViewHost* render_view_host, 75 void GetSelectedFileInfo(content::RenderViewHost* render_view_host,
61 Profile* profile, 76 Profile* profile,
62 const std::vector<GURL>& file_urls, 77 const std::vector<GURL>& file_urls,
63 bool for_opening, 78 GetSelectedFileInfoLocalPathOption local_path_option,
64 GetSelectedFileInfoCallback callback); 79 GetSelectedFileInfoCallback callback);
65 80
66 } // namespace util 81 } // namespace util
67 } // namespace file_manager 82 } // namespace file_manager
68 83
69 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ 84 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698