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

Unified Diff: chrome/browser/ui/webui/screenshot_source.h

Issue 10908081: Refactor screenshot directory source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 8 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
« no previous file with comments | « chrome/browser/ui/webui/feedback_ui.cc ('k') | chrome/browser/ui/webui/screenshot_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/screenshot_source.h
diff --git a/chrome/browser/ui/webui/screenshot_source.h b/chrome/browser/ui/webui/screenshot_source.h
index b294a2deace846768e23633b699e806bf592dfab..c4323f438cef200a761d5cd5d67c2cf04a08003b 100644
--- a/chrome/browser/ui/webui/screenshot_source.h
+++ b/chrome/browser/ui/webui/screenshot_source.h
@@ -15,6 +15,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/gdata/drive_resource_metadata.h"
+#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
#endif
@@ -32,6 +33,19 @@ class ScreenshotSource : public ChromeURLDataManager::DataSource {
std::vector<unsigned char>* current_screenshot,
Profile* profile);
+#if defined(USE_ASH)
+
+ // Queries the browser process to determine if screenshots are disabled.
+ static bool AreScreenshotsDisabled();
+
+ // Common access for the screenshot directory, parameter is set to the
+ // requested directory and return value of true is given upon success.
+ static bool GetScreenshotDirectory(FilePath* directory);
+#endif
+
+ // Get the basefilename for screenshots
+ static std::string GetScreenshotBaseFilename();
+
// Called when the network layer has requested a resource underneath
// the path we registered.
virtual void StartDataRequest(const std::string& path,
@@ -45,6 +59,21 @@ class ScreenshotSource : public ChromeURLDataManager::DataSource {
// Note: This method strips the query string from the given path.
ScreenshotDataPtr GetCachedScreenshot(const std::string& screenshot_path);
+ // Url that represents the base directory for screenshots.
+ static const char kScreenshotUrlRoot[];
+ // Identifier for the current screenshot
+ // (relative to screenshot base directory).
+ static const char kScreenshotCurrent[];
+ // Path for directory where screenshots are saved
+ // (relative to screenshot base directory).
+ static const char kScreenshotSaved[];
+#if defined(OS_CHROMEOS)
+ // Common prefix to screenshot filenames.
+ static const char kScreenshotPrefix[];
+ // Common suffix to screenshot filenames.
+ static const char kScreenshotSuffix[];
+#endif
+
private:
virtual ~ScreenshotSource();
« no previous file with comments | « chrome/browser/ui/webui/feedback_ui.cc ('k') | chrome/browser/ui/webui/screenshot_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698