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

Side by Side Diff: ash/test/test_screenshot_delegate.h

Issue 1909873002: Allow taking screen shot of a non child window which has delegate to paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months 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
« no previous file with comments | « ash/shell.cc ('k') | ash/test/test_screenshot_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ 5 #ifndef ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_
6 #define ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ 6 #define ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_
7 7
8 #include "ash/screenshot_delegate.h" 8 #include "ash/screenshot_delegate.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 bool CanTakeScreenshot() override; 26 bool CanTakeScreenshot() override;
27 27
28 int handle_take_screenshot_count() const { 28 int handle_take_screenshot_count() const {
29 return handle_take_screenshot_count_; 29 return handle_take_screenshot_count_;
30 } 30 }
31 31
32 int handle_take_partial_screenshot_count() const { 32 int handle_take_partial_screenshot_count() const {
33 return handle_take_partial_screenshot_count_; 33 return handle_take_partial_screenshot_count_;
34 } 34 }
35 35
36 int handle_take_window_screenshot_count() const {
37 return handle_take_window_screenshot_count_;
38 }
39
40 const gfx::Rect& last_rect() const { return last_rect_; } 36 const gfx::Rect& last_rect() const { return last_rect_; }
41 37
38 const aura::Window* GetSelectedWindowAndReset();
39
42 void set_can_take_screenshot(bool can_take_screenshot) { 40 void set_can_take_screenshot(bool can_take_screenshot) {
43 can_take_screenshot_ = can_take_screenshot; 41 can_take_screenshot_ = can_take_screenshot;
44 } 42 }
45 43
46 private: 44 private:
47 int handle_take_screenshot_count_; 45 int handle_take_screenshot_count_;
48 int handle_take_partial_screenshot_count_; 46 int handle_take_partial_screenshot_count_;
49 int handle_take_window_screenshot_count_;
50 gfx::Rect last_rect_; 47 gfx::Rect last_rect_;
51 bool can_take_screenshot_; 48 bool can_take_screenshot_;
49 aura::Window* selected_window_;
52 50
53 DISALLOW_COPY_AND_ASSIGN(TestScreenshotDelegate); 51 DISALLOW_COPY_AND_ASSIGN(TestScreenshotDelegate);
54 }; 52 };
55 53
56 } // namespace test 54 } // namespace test
57 } // namespace ash 55 } // namespace ash
58 56
59 #endif // ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ 57 #endif // ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/test/test_screenshot_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698