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

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

Issue 505913002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add {} 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 bool ScreenshotTaker::HasObserver(ScreenshotTakerObserver* observer) const { 546 bool ScreenshotTaker::HasObserver(ScreenshotTakerObserver* observer) const {
547 return observers_.HasObserver(observer); 547 return observers_.HasObserver(observer);
548 } 548 }
549 549
550 void ScreenshotTaker::GrabWindowSnapshotAsyncCallback( 550 void ScreenshotTaker::GrabWindowSnapshotAsyncCallback(
551 base::FilePath screenshot_path, 551 base::FilePath screenshot_path,
552 bool is_partial, 552 bool is_partial,
553 int window_idx, 553 int window_idx,
554 scoped_refptr<base::RefCountedBytes> png_data) { 554 scoped_refptr<base::RefCountedBytes> png_data) {
555 if (!png_data) { 555 if (!png_data.get()) {
556 if (is_partial) { 556 if (is_partial) {
557 LOG(ERROR) << "Failed to grab the window screenshot"; 557 LOG(ERROR) << "Failed to grab the window screenshot";
558 ShowNotification( 558 ShowNotification(
559 ScreenshotTakerObserver::SCREENSHOT_GRABWINDOW_PARTIAL_FAILED, 559 ScreenshotTakerObserver::SCREENSHOT_GRABWINDOW_PARTIAL_FAILED,
560 screenshot_path); 560 screenshot_path);
561 } else { 561 } else {
562 LOG(ERROR) << "Failed to grab the window screenshot for " << window_idx; 562 LOG(ERROR) << "Failed to grab the window screenshot for " << window_idx;
563 ShowNotification( 563 ShowNotification(
564 ScreenshotTakerObserver::SCREENSHOT_GRABWINDOW_FULL_FAILED, 564 ScreenshotTakerObserver::SCREENSHOT_GRABWINDOW_FULL_FAILED,
565 screenshot_path); 565 screenshot_path);
(...skipping 60 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

Powered by Google App Engine
This is Rietveld 408576698