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

Side by Side Diff: chrome/browser/ui/ash/screenshot_taker.cc

Issue 10815024: Revert 147594 - NaCl: Remove two uses of '#include "nacl/nacl_log.h"' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/ui/ash/screenshot_taker.h" 5 #include "chrome/browser/ui/ash/screenshot_taker.h"
6 6
7 #include <climits> 7 #include <climits>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 bool is_logged_in = true; 147 bool is_logged_in = true;
148 #if defined(OS_CHROMEOS) 148 #if defined(OS_CHROMEOS)
149 is_logged_in = chromeos::UserManager::Get()->IsUserLoggedIn(); 149 is_logged_in = chromeos::UserManager::Get()->IsUserLoggedIn();
150 #endif 150 #endif
151 151
152 FilePath screenshot_directory; 152 FilePath screenshot_directory;
153 if (is_logged_in) { 153 if (is_logged_in) {
154 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext( 154 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
155 ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext()); 155 ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext());
156 screenshot_directory = download_prefs->download_path(); 156 screenshot_directory = download_prefs->DownloadPath();
157 } else { 157 } else {
158 if (!file_util::GetTempDir(&screenshot_directory)) { 158 if (!file_util::GetTempDir(&screenshot_directory)) {
159 LOG(ERROR) << "Failed to find temporary directory."; 159 LOG(ERROR) << "Failed to find temporary directory.";
160 return; 160 return;
161 } 161 }
162 } 162 }
163 163
164 bool use_24hour_clock = ShouldUse24HourClock(); 164 bool use_24hour_clock = ShouldUse24HourClock();
165 165
166 if (GrabWindowSnapshot(window, rect, &png_data->data())) { 166 if (GrabWindowSnapshot(window, rect, &png_data->data())) {
(...skipping 26 matching lines...) Expand all
193 ash::internal::kShellWindowId_OverlayContainer)->layer(); 193 ash::internal::kShellWindowId_OverlayContainer)->layer();
194 parent->Add(visual_feedback_layer_.get()); 194 parent->Add(visual_feedback_layer_.get());
195 visual_feedback_layer_->SetVisible(true); 195 visual_feedback_layer_->SetVisible(true);
196 196
197 MessageLoopForUI::current()->PostDelayedTask( 197 MessageLoopForUI::current()->PostDelayedTask(
198 FROM_HERE, 198 FROM_HERE,
199 base::Bind(&ScreenshotTaker::CloseVisualFeedbackLayer, 199 base::Bind(&ScreenshotTaker::CloseVisualFeedbackLayer,
200 base::Unretained(this)), 200 base::Unretained(this)),
201 base::TimeDelta::FromMilliseconds(kVisualFeedbackLayerDisplayTimeMs)); 201 base::TimeDelta::FromMilliseconds(kVisualFeedbackLayerDisplayTimeMs));
202 } 202 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698