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" | |
19 #include "ui/base/win/foreground_helper.h" | 18 #include "ui/base/win/foreground_helper.h" |
20 #include "ui/ui_controls/ui_controls.h" | 19 #include "ui/ui_controls/ui_controls.h" |
21 #include "ui/views/focus/focus_manager.h" | 20 #include "ui/views/focus/focus_manager.h" |
22 | 21 |
23 namespace ui_test_utils { | 22 namespace ui_test_utils { |
24 | 23 |
25 namespace { | 24 namespace { |
26 | 25 |
27 const char kSnapshotBaseName[] = "ChromiumSnapshot"; | 26 const char kSnapshotBaseName[] = "ChromiumSnapshot"; |
28 const char kSnapshotExtension[] = ".png"; | 27 const char kSnapshotExtension[] = ".png"; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 136 |
138 if (succeeded && screenshot_path != NULL) | 137 if (succeeded && screenshot_path != NULL) |
139 *screenshot_path = out_path; | 138 *screenshot_path = out_path; |
140 | 139 |
141 return succeeded; | 140 return succeeded; |
142 } | 141 } |
143 | 142 |
144 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) { | 143 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) { |
145 FilePath desktop; | 144 FilePath desktop; |
146 | 145 |
147 return PathService::Get(chrome::DIR_USER_DESKTOP, &desktop) && | 146 return PathService::Get(base::DIR_USER_DESKTOP, &desktop) && |
148 SaveScreenSnapshotToDirectory(desktop, screenshot_path); | 147 SaveScreenSnapshotToDirectory(desktop, screenshot_path); |
149 } | 148 } |
150 | 149 |
151 } // namespace ui_test_utils | 150 } // namespace ui_test_utils |
OLD | NEW |