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

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

Issue 572853002: Realigning the WeakPtrFactory initialization order in chrome/ui folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed mac error Created 6 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 unified diff | Download patch
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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_SUCCESS; 382 return IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_SUCCESS;
383 default: 383 default:
384 return IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_FAIL; 384 return IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_FAIL;
385 } 385 }
386 } 386 }
387 #endif 387 #endif
388 388
389 } // namespace 389 } // namespace
390 390
391 ScreenshotTaker::ScreenshotTaker() 391 ScreenshotTaker::ScreenshotTaker()
392 : factory_(this), 392 : profile_for_test_(NULL),
393 profile_for_test_(NULL) { 393 factory_(this) {
394 } 394 }
395 395
396 ScreenshotTaker::~ScreenshotTaker() { 396 ScreenshotTaker::~ScreenshotTaker() {
397 } 397 }
398 398
399 void ScreenshotTaker::HandleTakeScreenshotForAllRootWindows() { 399 void ScreenshotTaker::HandleTakeScreenshotForAllRootWindows() {
400 if (g_browser_process->local_state()-> 400 if (g_browser_process->local_state()->
401 GetBoolean(prefs::kDisableScreenshots)) { 401 GetBoolean(prefs::kDisableScreenshots)) {
402 ShowNotification(ScreenshotTakerObserver::SCREENSHOTS_DISABLED, 402 ShowNotification(ScreenshotTakerObserver::SCREENSHOTS_DISABLED,
403 base::FilePath()); 403 base::FilePath());
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 } 626 }
627 627
628 void ScreenshotTaker::SetScreenshotBasenameForTest( 628 void ScreenshotTaker::SetScreenshotBasenameForTest(
629 const std::string& basename) { 629 const std::string& basename) {
630 screenshot_basename_for_test_ = basename; 630 screenshot_basename_for_test_ = basename;
631 } 631 }
632 632
633 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { 633 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) {
634 profile_for_test_ = profile; 634 profile_for_test_ = profile;
635 } 635 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/screenshot_taker.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698