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/test/base/ui_test_utils.h" | 5 #include "chrome/test/base/ui_test_utils.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #include "chrome/browser/ui/views/frame/browser_view.h" | 16 #include "chrome/browser/ui/views/frame/browser_view.h" |
17 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" | 17 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" |
| 18 #include "chrome/common/chrome_paths.h" |
18 #include "ui/base/win/foreground_helper.h" | 19 #include "ui/base/win/foreground_helper.h" |
19 #include "ui/ui_controls/ui_controls.h" | 20 #include "ui/ui_controls/ui_controls.h" |
20 #include "ui/views/focus/focus_manager.h" | 21 #include "ui/views/focus/focus_manager.h" |
21 | 22 |
22 namespace ui_test_utils { | 23 namespace ui_test_utils { |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 const char kSnapshotBaseName[] = "ChromiumSnapshot"; | 27 const char kSnapshotBaseName[] = "ChromiumSnapshot"; |
27 const char kSnapshotExtension[] = ".png"; | 28 const char kSnapshotExtension[] = ".png"; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 137 |
137 if (succeeded && screenshot_path != NULL) | 138 if (succeeded && screenshot_path != NULL) |
138 *screenshot_path = out_path; | 139 *screenshot_path = out_path; |
139 | 140 |
140 return succeeded; | 141 return succeeded; |
141 } | 142 } |
142 | 143 |
143 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) { | 144 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) { |
144 FilePath desktop; | 145 FilePath desktop; |
145 | 146 |
146 return PathService::Get(base::DIR_USER_DESKTOP, &desktop) && | 147 return PathService::Get(chrome::DIR_USER_DESKTOP, &desktop) && |
147 SaveScreenSnapshotToDirectory(desktop, screenshot_path); | 148 SaveScreenSnapshotToDirectory(desktop, screenshot_path); |
148 } | 149 } |
149 | 150 |
150 } // namespace ui_test_utils | 151 } // namespace ui_test_utils |
OLD | NEW |