| 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 27 matching lines...) Expand all Loading... |
| 38 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 38 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
| 40 #include "ui/base/resource/resource_bundle.h" | 40 #include "ui/base/resource/resource_bundle.h" |
| 41 #include "ui/gfx/image/image.h" | 41 #include "ui/gfx/image/image.h" |
| 42 #include "ui/snapshot/snapshot.h" | 42 #include "ui/snapshot/snapshot.h" |
| 43 | 43 |
| 44 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
| 45 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 45 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| 46 #include "chrome/browser/chromeos/drive/file_system_util.h" | 46 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 47 #include "chrome/browser/chromeos/file_manager/open_util.h" | 47 #include "chrome/browser/chromeos/file_manager/open_util.h" |
| 48 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 49 #include "chrome/browser/notifications/desktop_notification_service.h" | 48 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 50 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 49 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 51 #include "chromeos/login/login_state.h" | 50 #include "chromeos/login/login_state.h" |
| 51 #include "components/user_manager/user_manager.h" |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 namespace { | 54 namespace { |
| 55 // The minimum interval between two screenshot commands. It has to be | 55 // The minimum interval between two screenshot commands. It has to be |
| 56 // more than 1000 to prevent the conflict of filenames. | 56 // more than 1000 to prevent the conflict of filenames. |
| 57 const int kScreenshotMinimumIntervalInMS = 1000; | 57 const int kScreenshotMinimumIntervalInMS = 1000; |
| 58 | 58 |
| 59 const char kNotificationId[] = "screenshot"; | 59 const char kNotificationId[] = "screenshot"; |
| 60 | 60 |
| 61 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 } | 627 } |
| 628 | 628 |
| 629 void ScreenshotTaker::SetScreenshotBasenameForTest( | 629 void ScreenshotTaker::SetScreenshotBasenameForTest( |
| 630 const std::string& basename) { | 630 const std::string& basename) { |
| 631 screenshot_basename_for_test_ = basename; | 631 screenshot_basename_for_test_ = basename; |
| 632 } | 632 } |
| 633 | 633 |
| 634 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { | 634 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { |
| 635 profile_for_test_ = profile; | 635 profile_for_test_ = profile; |
| 636 } | 636 } |
| OLD | NEW |