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

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

Issue 2826283004: Add MetalayerToolTest (Closed)
Patch Set: Created 3 years, 8 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/system/palette/tools/metalayer_unittest.cc ('k') | ash/test/test_palette_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PALETTE_DELEGATE_H_ 5 #ifndef ASH_TEST_TEST_PALETTE_DELEGATE_H_
6 #define ASH_TEST_TEST_PALETTE_DELEGATE_H_ 6 #define ASH_TEST_TEST_PALETTE_DELEGATE_H_
7 7
8 #include "ash/palette_delegate.h" 8 #include "ash/palette_delegate.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 10
(...skipping 22 matching lines...) Expand all
33 void set_has_note_app(bool has_note_app) { has_note_app_ = has_note_app; } 33 void set_has_note_app(bool has_note_app) { has_note_app_ = has_note_app; }
34 34
35 void set_should_auto_open_palette(bool should_auto_open_palette) { 35 void set_should_auto_open_palette(bool should_auto_open_palette) {
36 should_auto_open_palette_ = should_auto_open_palette; 36 should_auto_open_palette_ = should_auto_open_palette;
37 } 37 }
38 38
39 void set_should_show_palette(bool should_show_palette) { 39 void set_should_show_palette(bool should_show_palette) {
40 should_show_palette_ = should_show_palette; 40 should_show_palette_ = should_show_palette;
41 } 41 }
42 42
43 void set_is_metalayer_supported(bool is_metalayer_supported) {
44 is_metalayer_supported_ = is_metalayer_supported;
45 }
46
47 int show_metalayer_count() const { return show_metalayer_count_; }
48
49 base::Closure metalayer_closed() const { return metalayer_closed_; }
stevenjb 2017/04/26 17:21:05 If these are only used for testing, please append
oshima 2017/04/28 21:47:34 this is a test delegate, so this is fine. :)
stevenjb 2017/04/28 21:49:11 Oh, yeah, never mind :)
50
43 private: 51 private:
44 // PaletteDelegate: 52 // PaletteDelegate:
45 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( 53 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
46 const EnableListener& on_state_changed) override; 54 const EnableListener& on_state_changed) override;
47 void CreateNote() override; 55 void CreateNote() override;
48 bool HasNoteApp() override; 56 bool HasNoteApp() override;
49 bool ShouldAutoOpenPalette() override; 57 bool ShouldAutoOpenPalette() override;
50 bool ShouldShowPalette() override; 58 bool ShouldShowPalette() override;
51 void TakeScreenshot() override; 59 void TakeScreenshot() override;
52 void TakePartialScreenshot(const base::Closure& done) override; 60 void TakePartialScreenshot(const base::Closure& done) override;
53 void CancelPartialScreenshot() override; 61 void CancelPartialScreenshot() override;
54 bool IsMetalayerSupported() override; 62 bool IsMetalayerSupported() override;
55 void ShowMetalayer(const base::Closure& closed) override; 63 void ShowMetalayer(const base::Closure& closed) override;
56 void HideMetalayer() override; 64 void HideMetalayer() override;
57 65
58 int create_note_count_ = 0; 66 int create_note_count_ = 0;
59 int has_note_app_count_ = 0; 67 int has_note_app_count_ = 0;
60 int take_screenshot_count_ = 0; 68 int take_screenshot_count_ = 0;
61 int take_partial_screenshot_count_ = 0; 69 int take_partial_screenshot_count_ = 0;
62 base::Closure partial_screenshot_done_; 70 base::Closure partial_screenshot_done_;
63 bool has_note_app_ = false; 71 bool has_note_app_ = false;
64 bool should_auto_open_palette_ = false; 72 bool should_auto_open_palette_ = false;
65 bool should_show_palette_ = false; 73 bool should_show_palette_ = false;
74 bool is_metalayer_supported_ = false;
75 int show_metalayer_count_ = 0;
76 base::Closure metalayer_closed_;
66 77
67 DISALLOW_COPY_AND_ASSIGN(TestPaletteDelegate); 78 DISALLOW_COPY_AND_ASSIGN(TestPaletteDelegate);
68 }; 79 };
69 80
70 } // namespace ash 81 } // namespace ash
71 82
72 #endif // ASH_TEST_TEST_PALETTE_DELEGATE_H_ 83 #endif // ASH_TEST_TEST_PALETTE_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/system/palette/tools/metalayer_unittest.cc ('k') | ash/test/test_palette_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698