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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_screenshot_source.cc

Issue 5977010: Move CancellationFlag and WaitableEvent to the synchronization subdirectory.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/dom_ui/dom_ui_screenshot_source.h" 5 #include "chrome/browser/dom_ui/dom_ui_screenshot_source.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/ref_counted_memory.h" 10 #include "base/ref_counted_memory.h"
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "base/waitable_event.h" 13 #include "base/synchronization/waitable_event.h"
14 #include "chrome/browser/browser_thread.h" 14 #include "chrome/browser/browser_thread.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 #include "gfx/codec/jpeg_codec.h" 17 #include "gfx/codec/jpeg_codec.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 19 #include "third_party/skia/include/core/SkBitmap.h"
20 20
21 static const char kCurrentScreenshot[] = "current"; 21 static const char kCurrentScreenshot[] = "current";
22 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
23 static const char kSavedScreenshots[] = "saved/"; 23 static const char kSavedScreenshots[] = "saved/";
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool is_off_the_record, 114 bool is_off_the_record,
115 int request_id) { 115 int request_id) {
116 SendResponse(request_id, new RefCountedBytes(GetScreenshot(path))); 116 SendResponse(request_id, new RefCountedBytes(GetScreenshot(path)));
117 } 117 }
118 118
119 std::string DOMUIScreenshotSource::GetMimeType(const std::string&) const { 119 std::string DOMUIScreenshotSource::GetMimeType(const std::string&) const {
120 // We need to explicitly return a mime type, otherwise if the user tries to 120 // We need to explicitly return a mime type, otherwise if the user tries to
121 // drag the image they get no extension. 121 // drag the image they get no extension.
122 return "image/png"; 122 return "image/png";
123 } 123 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/bug_report_ui.cc ('k') | chrome/browser/file_path_watcher/file_path_watcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698