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 #ifndef CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ |
6 #define CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ | 6 #define CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ |
7 | 7 |
8 #include "ash/screenshot_delegate.h" | 8 #include "ash/screenshot_delegate.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void HandleTakePartialScreenshot(aura::Window* window, | 60 void HandleTakePartialScreenshot(aura::Window* window, |
61 const gfx::Rect& rect) override; | 61 const gfx::Rect& rect) override; |
62 bool CanTakeScreenshot() override; | 62 bool CanTakeScreenshot() override; |
63 | 63 |
64 void ShowNotification( | 64 void ShowNotification( |
65 ScreenshotTakerObserver::Result screenshot_result, | 65 ScreenshotTakerObserver::Result screenshot_result, |
66 const base::FilePath& screenshot_path); | 66 const base::FilePath& screenshot_path); |
67 | 67 |
68 void AddObserver(ScreenshotTakerObserver* observer); | 68 void AddObserver(ScreenshotTakerObserver* observer); |
69 void RemoveObserver(ScreenshotTakerObserver* observer); | 69 void RemoveObserver(ScreenshotTakerObserver* observer); |
70 bool HasObserver(ScreenshotTakerObserver* observer) const; | 70 bool HasObserver(const ScreenshotTakerObserver* observer) const; |
71 | 71 |
72 private: | 72 private: |
73 friend class ash::test::ScreenshotTakerTest; | 73 friend class ash::test::ScreenshotTakerTest; |
74 | 74 |
75 void GrabWindowSnapshotAsyncCallback( | 75 void GrabWindowSnapshotAsyncCallback( |
76 base::FilePath screenshot_path, | 76 base::FilePath screenshot_path, |
77 bool is_partial, | 77 bool is_partial, |
78 int window_idx, | 78 int window_idx, |
79 scoped_refptr<base::RefCountedBytes> png_data); | 79 scoped_refptr<base::RefCountedBytes> png_data); |
80 void GrabPartialWindowSnapshotAsync(aura::Window* window, | 80 void GrabPartialWindowSnapshotAsync(aura::Window* window, |
(...skipping 25 matching lines...) Expand all Loading... |
106 base::FilePath screenshot_directory_for_test_; | 106 base::FilePath screenshot_directory_for_test_; |
107 std::string screenshot_basename_for_test_; | 107 std::string screenshot_basename_for_test_; |
108 Profile* profile_for_test_; | 108 Profile* profile_for_test_; |
109 | 109 |
110 base::WeakPtrFactory<ScreenshotTaker> factory_; | 110 base::WeakPtrFactory<ScreenshotTaker> factory_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(ScreenshotTaker); | 112 DISALLOW_COPY_AND_ASSIGN(ScreenshotTaker); |
113 }; | 113 }; |
114 | 114 |
115 #endif // CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ | 115 #endif // CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ |
OLD | NEW |