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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 ScreenshotTakerNotificationDelegate(bool success, | 121 ScreenshotTakerNotificationDelegate(bool success, |
122 Profile* profile, | 122 Profile* profile, |
123 const base::FilePath& screenshot_path) | 123 const base::FilePath& screenshot_path) |
124 : success_(success), | 124 : success_(success), |
125 profile_(profile), | 125 profile_(profile), |
126 screenshot_path_(screenshot_path) { | 126 screenshot_path_(screenshot_path) { |
127 } | 127 } |
128 | 128 |
129 // Overridden from NotificationDelegate: | 129 // Overridden from NotificationDelegate: |
130 void Display() override {} | 130 void Display() override {} |
131 void Error() override {} | |
132 void Close(bool by_user) override {} | 131 void Close(bool by_user) override {} |
133 void Click() override { | 132 void Click() override { |
134 if (!success_) | 133 if (!success_) |
135 return; | 134 return; |
136 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
137 file_manager::util::ShowItemInFolder(profile_, screenshot_path_); | 136 file_manager::util::ShowItemInFolder(profile_, screenshot_path_); |
138 #else | 137 #else |
139 // TODO(sschmitz): perhaps add similar action for Windows. | 138 // TODO(sschmitz): perhaps add similar action for Windows. |
140 #endif | 139 #endif |
141 } | 140 } |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 } | 620 } |
622 | 621 |
623 void ScreenshotTaker::SetScreenshotBasenameForTest( | 622 void ScreenshotTaker::SetScreenshotBasenameForTest( |
624 const std::string& basename) { | 623 const std::string& basename) { |
625 screenshot_basename_for_test_ = basename; | 624 screenshot_basename_for_test_ = basename; |
626 } | 625 } |
627 | 626 |
628 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { | 627 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { |
629 profile_for_test_ = profile; | 628 profile_for_test_ = profile; |
630 } | 629 } |
OLD | NEW |