| OLD | NEW |
| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 } | 528 } |
| 529 | 529 |
| 530 void ScreenshotTaker::AddObserver(ScreenshotTakerObserver* observer) { | 530 void ScreenshotTaker::AddObserver(ScreenshotTakerObserver* observer) { |
| 531 observers_.AddObserver(observer); | 531 observers_.AddObserver(observer); |
| 532 } | 532 } |
| 533 | 533 |
| 534 void ScreenshotTaker::RemoveObserver(ScreenshotTakerObserver* observer) { | 534 void ScreenshotTaker::RemoveObserver(ScreenshotTakerObserver* observer) { |
| 535 observers_.RemoveObserver(observer); | 535 observers_.RemoveObserver(observer); |
| 536 } | 536 } |
| 537 | 537 |
| 538 bool ScreenshotTaker::HasObserver(ScreenshotTakerObserver* observer) const { | 538 bool ScreenshotTaker::HasObserver( |
| 539 const ScreenshotTakerObserver* observer) const { |
| 539 return observers_.HasObserver(observer); | 540 return observers_.HasObserver(observer); |
| 540 } | 541 } |
| 541 | 542 |
| 542 void ScreenshotTaker::GrabWindowSnapshotAsyncCallback( | 543 void ScreenshotTaker::GrabWindowSnapshotAsyncCallback( |
| 543 base::FilePath screenshot_path, | 544 base::FilePath screenshot_path, |
| 544 bool is_partial, | 545 bool is_partial, |
| 545 int window_idx, | 546 int window_idx, |
| 546 scoped_refptr<base::RefCountedBytes> png_data) { | 547 scoped_refptr<base::RefCountedBytes> png_data) { |
| 547 if (!png_data.get()) { | 548 if (!png_data.get()) { |
| 548 if (is_partial) { | 549 if (is_partial) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 } | 619 } |
| 619 | 620 |
| 620 void ScreenshotTaker::SetScreenshotBasenameForTest( | 621 void ScreenshotTaker::SetScreenshotBasenameForTest( |
| 621 const std::string& basename) { | 622 const std::string& basename) { |
| 622 screenshot_basename_for_test_ = basename; | 623 screenshot_basename_for_test_ = basename; |
| 623 } | 624 } |
| 624 | 625 |
| 625 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { | 626 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { |
| 626 profile_for_test_ = profile; | 627 profile_for_test_ = profile; |
| 627 } | 628 } |
| OLD | NEW |