| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 622 } |
| 626 | 623 |
| 627 void ScreenshotTaker::SetScreenshotBasenameForTest( | 624 void ScreenshotTaker::SetScreenshotBasenameForTest( |
| 628 const std::string& basename) { | 625 const std::string& basename) { |
| 629 screenshot_basename_for_test_ = basename; | 626 screenshot_basename_for_test_ = basename; |
| 630 } | 627 } |
| 631 | 628 |
| 632 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { | 629 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { |
| 633 profile_for_test_ = profile; | 630 profile_for_test_ = profile; |
| 634 } | 631 } |
| OLD | NEW |