Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome/browser/ui/ash/screenshot_taker.cc

Issue 684253002: Provide default implementations for NotificationDelegate methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 public: 120 public:
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 {}
131 void Error() override {}
132 void Close(bool by_user) override {}
133 void Click() override { 130 void Click() override {
134 if (!success_) 131 if (!success_)
135 return; 132 return;
136 #if defined(OS_CHROMEOS) 133 #if defined(OS_CHROMEOS)
137 file_manager::util::ShowItemInFolder(profile_, screenshot_path_); 134 file_manager::util::ShowItemInFolder(profile_, screenshot_path_);
138 #else 135 #else
139 // TODO(sschmitz): perhaps add similar action for Windows. 136 // TODO(sschmitz): perhaps add similar action for Windows.
140 #endif 137 #endif
141 } 138 }
142 void ButtonClick(int button_index) override { 139 void ButtonClick(int button_index) override {
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 618 }
622 619
623 void ScreenshotTaker::SetScreenshotBasenameForTest( 620 void ScreenshotTaker::SetScreenshotBasenameForTest(
624 const std::string& basename) { 621 const std::string& basename) {
625 screenshot_basename_for_test_ = basename; 622 screenshot_basename_for_test_ = basename;
626 } 623 }
627 624
628 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { 625 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) {
629 profile_for_test_ = profile; 626 profile_for_test_ = profile;
630 } 627 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698