OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 virtual void TearDown() { | 43 virtual void TearDown() { |
44 RunAllPendingInMessageLoop(); | 44 RunAllPendingInMessageLoop(); |
45 AshTestBase::TearDown(); | 45 AshTestBase::TearDown(); |
46 } | 46 } |
47 | 47 |
48 // Overridden from ScreenshotTakerObserver | 48 // Overridden from ScreenshotTakerObserver |
49 virtual void OnScreenshotCompleted( | 49 virtual void OnScreenshotCompleted( |
50 ScreenshotTakerObserver::Result screenshot_result, | 50 ScreenshotTakerObserver::Result screenshot_result, |
51 const base::FilePath& screenshot_path) OVERRIDE { | 51 const base::FilePath& screenshot_path) override { |
52 screenshot_complete_ = true; | 52 screenshot_complete_ = true; |
53 screenshot_result_ = screenshot_result; | 53 screenshot_result_ = screenshot_result; |
54 screenshot_path_ = screenshot_path; | 54 screenshot_path_ = screenshot_path; |
55 if (!running_) | 55 if (!running_) |
56 return; | 56 return; |
57 message_loop_runner_->Quit(); | 57 message_loop_runner_->Quit(); |
58 running_ = false; | 58 running_ = false; |
59 } | 59 } |
60 | 60 |
61 protected: | 61 protected: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) | 137 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) |
138 EXPECT_TRUE(base::PathExists(screenshot_path_)); | 138 EXPECT_TRUE(base::PathExists(screenshot_path_)); |
139 | 139 |
140 #if defined(OS_CHROMEOS) | 140 #if defined(OS_CHROMEOS) |
141 chromeos::LoginState::Shutdown(); | 141 chromeos::LoginState::Shutdown(); |
142 #endif | 142 #endif |
143 } | 143 } |
144 | 144 |
145 } // namespace test | 145 } // namespace test |
146 } // namespace ash | 146 } // namespace ash |
OLD | NEW |