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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 (screenshot_result == ScreenshotTakerObserver::SCREENSHOT_SUCCESS); | 433 (screenshot_result == ScreenshotTakerObserver::SCREENSHOT_SUCCESS); |
434 return new Notification( | 434 return new Notification( |
435 message_center::NOTIFICATION_TYPE_SIMPLE, | 435 message_center::NOTIFICATION_TYPE_SIMPLE, |
436 GURL(kNotificationOriginUrl), | 436 GURL(kNotificationOriginUrl), |
437 l10n_util::GetStringUTF16( | 437 l10n_util::GetStringUTF16( |
438 GetScreenshotNotificationTitle(screenshot_result)), | 438 GetScreenshotNotificationTitle(screenshot_result)), |
439 l10n_util::GetStringUTF16( | 439 l10n_util::GetStringUTF16( |
440 GetScreenshotNotificationText(screenshot_result)), | 440 GetScreenshotNotificationText(screenshot_result)), |
441 ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 441 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
442 IDR_SCREENSHOT_NOTIFICATION_ICON), | 442 IDR_SCREENSHOT_NOTIFICATION_ICON), |
443 WebKit::WebTextDirectionDefault, | 443 blink::WebTextDirectionDefault, |
444 message_center::NotifierId(ash::system_notifier::NOTIFIER_SCREENSHOT), | 444 message_center::NotifierId(ash::system_notifier::NOTIFIER_SCREENSHOT), |
445 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_NOTIFIER_SCREENSHOT_NAME), | 445 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_NOTIFIER_SCREENSHOT_NAME), |
446 replace_id, | 446 replace_id, |
447 message_center::RichNotificationData(), | 447 message_center::RichNotificationData(), |
448 new ScreenshotTakerNotificationDelegate(success, screenshot_path)); | 448 new ScreenshotTakerNotificationDelegate(success, screenshot_path)); |
449 } | 449 } |
450 | 450 |
451 void ScreenshotTaker::ShowNotification( | 451 void ScreenshotTaker::ShowNotification( |
452 ScreenshotTakerObserver::Result screenshot_result, | 452 ScreenshotTakerObserver::Result screenshot_result, |
453 const base::FilePath& screenshot_path) { | 453 const base::FilePath& screenshot_path) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 | 499 |
500 void ScreenshotTaker::SetScreenshotBasenameForTest( | 500 void ScreenshotTaker::SetScreenshotBasenameForTest( |
501 const std::string& basename) { | 501 const std::string& basename) { |
502 screenshot_basename_for_test_ = basename; | 502 screenshot_basename_for_test_ = basename; |
503 } | 503 } |
504 | 504 |
505 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { | 505 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { |
506 profile_for_test_ = profile; | 506 profile_for_test_ = profile; |
507 } | 507 } |
OLD | NEW |