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 "ash/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 #include "ash/accelerators/accelerator_table.h" | 6 #include "ash/accelerators/accelerator_table.h" |
7 #include "ash/caps_lock_delegate.h" | 7 #include "ash/caps_lock_delegate.h" |
8 #include "ash/ime_control_delegate.h" | 8 #include "ash/ime_control_delegate.h" |
9 #include "ash/screenshot_delegate.h" | 9 #include "ash/screenshot_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 }; | 63 }; |
64 | 64 |
65 class DummyScreenshotDelegate : public ScreenshotDelegate { | 65 class DummyScreenshotDelegate : public ScreenshotDelegate { |
66 public: | 66 public: |
67 DummyScreenshotDelegate() | 67 DummyScreenshotDelegate() |
68 : handle_take_screenshot_count_(0) { | 68 : handle_take_screenshot_count_(0) { |
69 } | 69 } |
70 virtual ~DummyScreenshotDelegate() {} | 70 virtual ~DummyScreenshotDelegate() {} |
71 | 71 |
72 // Overridden from ScreenshotDelegate: | 72 // Overridden from ScreenshotDelegate: |
73 virtual void HandleTakeScreenshot(aura::Window* window) OVERRIDE { | 73 virtual void HandleTakeScreenshotForAllRootWindows() OVERRIDE { |
74 if (window != NULL) | 74 ++handle_take_screenshot_count_; |
75 ++handle_take_screenshot_count_; | |
76 } | 75 } |
77 | 76 |
78 virtual void HandleTakePartialScreenshot( | 77 virtual void HandleTakePartialScreenshot( |
79 aura::Window* window, const gfx::Rect& rect) OVERRIDE { | 78 aura::Window* window, const gfx::Rect& rect) OVERRIDE { |
80 } | 79 } |
81 | 80 |
82 virtual bool CanTakeScreenshot() OVERRIDE { | 81 virtual bool CanTakeScreenshot() OVERRIDE { |
83 return true; | 82 return true; |
84 } | 83 } |
85 | 84 |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 EXPECT_FALSE(GetController()->IsReservedAccelerator( | 978 EXPECT_FALSE(GetController()->IsReservedAccelerator( |
980 ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE))); | 979 ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE))); |
981 EXPECT_FALSE(GetController()->IsReservedAccelerator( | 980 EXPECT_FALSE(GetController()->IsReservedAccelerator( |
982 ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE))); | 981 ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE))); |
983 EXPECT_FALSE(GetController()->IsReservedAccelerator( | 982 EXPECT_FALSE(GetController()->IsReservedAccelerator( |
984 ui::Accelerator(ui::VKEY_A, ui::EF_NONE))); | 983 ui::Accelerator(ui::VKEY_A, ui::EF_NONE))); |
985 } | 984 } |
986 | 985 |
987 } // namespace test | 986 } // namespace test |
988 } // namespace ash | 987 } // namespace ash |
OLD | NEW |