| OLD | NEW |
| 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_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ | 5 #ifndef ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ |
| 6 #define ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ | 6 #define ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ash/common/palette_delegate.h" | 8 #include "ash/common/palette_delegate.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 int has_note_app_count() const { return has_note_app_count_; } | 21 int has_note_app_count() const { return has_note_app_count_; } |
| 22 | 22 |
| 23 bool partial_magnifier_state() const { return partial_magnifier_state_; } | 23 bool partial_magnifier_state() const { return partial_magnifier_state_; } |
| 24 | 24 |
| 25 int take_screenshot_count() const { return take_screenshot_count_; } | 25 int take_screenshot_count() const { return take_screenshot_count_; } |
| 26 | 26 |
| 27 int take_partial_screenshot_count() const { | 27 int take_partial_screenshot_count() const { |
| 28 return take_partial_screenshot_count_; | 28 return take_partial_screenshot_count_; |
| 29 } | 29 } |
| 30 | 30 |
| 31 base::Closure partial_screenshot_done() const { |
| 32 return partial_screenshot_done_; |
| 33 } |
| 34 |
| 31 void set_has_note_app(bool has_note_app) { has_note_app_ = has_note_app; } | 35 void set_has_note_app(bool has_note_app) { has_note_app_ = has_note_app; } |
| 32 | 36 |
| 33 void set_should_auto_open_palette(bool should_auto_open_palette) { | 37 void set_should_auto_open_palette(bool should_auto_open_palette) { |
| 34 should_auto_open_palette_ = should_auto_open_palette; | 38 should_auto_open_palette_ = should_auto_open_palette; |
| 35 } | 39 } |
| 36 | 40 |
| 37 void set_should_show_palette(bool should_show_palette) { | 41 void set_should_show_palette(bool should_show_palette) { |
| 38 should_show_palette_ = should_show_palette; | 42 should_show_palette_ = should_show_palette; |
| 39 } | 43 } |
| 40 | 44 |
| 41 private: | 45 private: |
| 42 // PaletteDelegate: | 46 // PaletteDelegate: |
| 43 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( | 47 std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener( |
| 44 const EnableListener& on_state_changed) override; | 48 const EnableListener& on_state_changed) override; |
| 45 void CreateNote() override; | 49 void CreateNote() override; |
| 46 bool HasNoteApp() override; | 50 bool HasNoteApp() override; |
| 51 void OnLaserPointerEnabled() override; |
| 52 void OnLaserPointerDisabled() override; |
| 47 void SetPartialMagnifierState(bool enabled) override; | 53 void SetPartialMagnifierState(bool enabled) override; |
| 48 void SetStylusStateChangedCallback( | 54 void SetStylusStateChangedCallback( |
| 49 const OnStylusStateChangedCallback& on_stylus_state_changed) override; | 55 const OnStylusStateChangedCallback& on_stylus_state_changed) override; |
| 50 bool ShouldAutoOpenPalette() override; | 56 bool ShouldAutoOpenPalette() override; |
| 51 bool ShouldShowPalette() override; | 57 bool ShouldShowPalette() override; |
| 52 void TakeScreenshot() override; | 58 void TakeScreenshot() override; |
| 53 void TakePartialScreenshot() override; | 59 void TakePartialScreenshot(const base::Closure& done) override; |
| 54 void OnLaserPointerEnabled() override; | 60 void CancelPartialScreenshot() override; |
| 55 void OnLaserPointerDisabled() override; | |
| 56 | 61 |
| 57 int create_note_count_ = 0; | 62 int create_note_count_ = 0; |
| 58 int has_note_app_count_ = 0; | 63 int has_note_app_count_ = 0; |
| 59 bool partial_magnifier_state_ = false; | 64 bool partial_magnifier_state_ = false; |
| 60 int take_screenshot_count_ = 0; | 65 int take_screenshot_count_ = 0; |
| 61 int take_partial_screenshot_count_ = 0; | 66 int take_partial_screenshot_count_ = 0; |
| 67 base::Closure partial_screenshot_done_; |
| 62 bool has_note_app_ = false; | 68 bool has_note_app_ = false; |
| 63 bool should_auto_open_palette_ = false; | 69 bool should_auto_open_palette_ = false; |
| 64 bool should_show_palette_ = false; | 70 bool should_show_palette_ = false; |
| 65 | 71 |
| 66 DISALLOW_COPY_AND_ASSIGN(TestPaletteDelegate); | 72 DISALLOW_COPY_AND_ASSIGN(TestPaletteDelegate); |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 } // namespace ash | 75 } // namespace ash |
| 70 | 76 |
| 71 #endif // ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ | 77 #endif // ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ |
| OLD | NEW |