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

Side by Side Diff: chrome/browser/ui/webui/screenshot_source.h

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebuilding on 14039004. Created 7 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 static bool GetScreenshotDirectory(base::FilePath* directory); 46 static bool GetScreenshotDirectory(base::FilePath* directory);
47 #endif 47 #endif
48 48
49 // Get the basefilename for screenshots 49 // Get the basefilename for screenshots
50 static std::string GetScreenshotBaseFilename(); 50 static std::string GetScreenshotBaseFilename();
51 51
52 // content::URLDataSource implementation. 52 // content::URLDataSource implementation.
53 virtual std::string GetSource() const OVERRIDE; 53 virtual std::string GetSource() const OVERRIDE;
54 virtual void StartDataRequest( 54 virtual void StartDataRequest(
55 const std::string& path, 55 const std::string& path,
56 bool is_incognito, 56 int render_process_id,
57 int render_view_id,
57 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 58 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
58 virtual std::string GetMimeType(const std::string&) const OVERRIDE; 59 virtual std::string GetMimeType(const std::string&) const OVERRIDE;
59 60
60 // Get the screenshot specified by the given relative path that we've cached 61 // Get the screenshot specified by the given relative path that we've cached
61 // from a previous request to the screenshots source. 62 // from a previous request to the screenshots source.
62 // Note: This method strips the query string from the given path. 63 // Note: This method strips the query string from the given path.
63 ScreenshotDataPtr GetCachedScreenshot(const std::string& screenshot_path); 64 ScreenshotDataPtr GetCachedScreenshot(const std::string& screenshot_path);
64 65
65 // Url that represents the base directory for screenshots. 66 // Url that represents the base directory for screenshots.
66 static const char kScreenshotUrlRoot[]; 67 static const char kScreenshotUrlRoot[];
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Profile* profile_; 118 Profile* profile_;
118 119
119 // Key: Relative path to the screenshot (including filename) 120 // Key: Relative path to the screenshot (including filename)
120 // Value: Pointer to the screenshot data associated with the path. 121 // Value: Pointer to the screenshot data associated with the path.
121 std::map<std::string, ScreenshotDataPtr> cached_screenshots_; 122 std::map<std::string, ScreenshotDataPtr> cached_screenshots_;
122 123
123 DISALLOW_COPY_AND_ASSIGN(ScreenshotSource); 124 DISALLOW_COPY_AND_ASSIGN(ScreenshotSource);
124 }; 125 };
125 126
126 #endif // CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_ 127 #endif // CHROME_BROWSER_UI_WEBUI_SCREENSHOT_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698