| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 #endif | 156 #endif |
| 157 content::BrowserThread::GetBlockingPool()->PostTask( | 157 content::BrowserThread::GetBlockingPool()->PostTask( |
| 158 FROM_HERE, base::Bind( | 158 FROM_HERE, base::Bind( |
| 159 &ReadFileAndCopyToClipboardLocal, screenshot_path_)); | 159 &ReadFileAndCopyToClipboardLocal, screenshot_path_)); |
| 160 } | 160 } |
| 161 virtual bool HasClickedListener() override { return success_; } | 161 virtual bool HasClickedListener() override { return success_; } |
| 162 virtual std::string id() const override { | 162 virtual std::string id() const override { |
| 163 return std::string(kNotificationId); | 163 return std::string(kNotificationId); |
| 164 } | 164 } |
| 165 virtual content::WebContents* GetWebContents() const override { | |
| 166 return NULL; | |
| 167 } | |
| 168 | 165 |
| 169 private: | 166 private: |
| 170 virtual ~ScreenshotTakerNotificationDelegate() {} | 167 virtual ~ScreenshotTakerNotificationDelegate() {} |
| 171 | 168 |
| 172 const bool success_; | 169 const bool success_; |
| 173 Profile* profile_; | 170 Profile* profile_; |
| 174 const base::FilePath screenshot_path_; | 171 const base::FilePath screenshot_path_; |
| 175 | 172 |
| 176 DISALLOW_COPY_AND_ASSIGN(ScreenshotTakerNotificationDelegate); | 173 DISALLOW_COPY_AND_ASSIGN(ScreenshotTakerNotificationDelegate); |
| 177 }; | 174 }; |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 } | 623 } |
| 627 | 624 |
| 628 void ScreenshotTaker::SetScreenshotBasenameForTest( | 625 void ScreenshotTaker::SetScreenshotBasenameForTest( |
| 629 const std::string& basename) { | 626 const std::string& basename) { |
| 630 screenshot_basename_for_test_ = basename; | 627 screenshot_basename_for_test_ = basename; |
| 631 } | 628 } |
| 632 | 629 |
| 633 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { | 630 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { |
| 634 profile_for_test_ = profile; | 631 profile_for_test_ = profile; |
| 635 } | 632 } |
| OLD | NEW |