Index: ash/common/wm_shell.h |
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h |
index aa3036879cbed789f35a59495027ed0b0409226a..37dff178c66510d49a063d3cef0633db5f4ced9c 100644 |
--- a/ash/common/wm_shell.h |
+++ b/ash/common/wm_shell.h |
@@ -13,12 +13,9 @@ |
#include "ash/ash_export.h" |
#include "ash/common/media_delegate.h" |
#include "ash/common/metrics/user_metrics_action.h" |
+#include "base/gtest_prod_util.h" |
#include "base/observer_list.h" |
-namespace gfx { |
-class Rect; |
-} |
- |
namespace views { |
class PointerWatcher; |
} |
@@ -26,8 +23,10 @@ class PointerWatcher; |
namespace ash { |
class AccessibilityDelegate; |
+class BrightnessControlDelegate; |
class DisplayInfo; |
class FocusCycler; |
+class KeyboardBrightnessControlDelegate; |
class KeyboardUI; |
class MaximizeModeController; |
class MruWindowTracker; |
@@ -41,7 +40,6 @@ class WindowResizer; |
class WindowSelectorController; |
class WmActivationObserver; |
class WmDisplayObserver; |
-class WmRootWindowController; |
class WmWindow; |
namespace wm { |
@@ -64,8 +62,17 @@ class ASH_EXPORT WmShell { |
ShellDelegate* delegate() { return delegate_.get(); } |
+ BrightnessControlDelegate* brightness_control_delegate() const { |
James Cook
2016/07/08 16:29:34
see below
msw
2016/07/08 17:18:58
Done.
|
+ return brightness_control_delegate_.get(); |
+ } |
+ |
FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
+ KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() |
+ const { |
James Cook
2016/07/08 16:29:34
I don't think we generally make these sorts of acc
msw
2016/07/08 17:18:58
Done.
|
+ return keyboard_brightness_control_delegate_.get(); |
+ } |
+ |
KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); } |
MaximizeModeController* maximize_mode_controller() { |
@@ -217,6 +224,12 @@ class ASH_EXPORT WmShell { |
return &shell_observers_; |
} |
+ void SetBrightnessControlDelegate( |
+ std::unique_ptr<BrightnessControlDelegate> delegate); |
+ |
+ void SetKeyboardBrightnessControlDelegate( |
+ std::unique_ptr<KeyboardBrightnessControlDelegate> delegate); |
+ |
void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); |
// Helpers to set (and initialize) or destroy various delegates. |
@@ -235,12 +248,18 @@ class ASH_EXPORT WmShell { |
private: |
friend class Shell; |
+ FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, GlobalAccelerators); |
James Cook
2016/07/08 16:29:35
Could you "friend AcceleratorControllerTest" then
msw
2016/07/08 17:18:58
Done.
|
+ FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, DisallowedAtModalWindow); |
static WmShell* instance_; |
base::ObserverList<ShellObserver> shell_observers_; |
std::unique_ptr<ShellDelegate> delegate_; |
+ |
+ std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
std::unique_ptr<FocusCycler> focus_cycler_; |
+ std::unique_ptr<KeyboardBrightnessControlDelegate> |
+ keyboard_brightness_control_delegate_; |
std::unique_ptr<KeyboardUI> keyboard_ui_; |
std::unique_ptr<MaximizeModeController> maximize_mode_controller_; |
std::unique_ptr<MediaDelegate> media_delegate_; |