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

Side by Side Diff: ash/common/system/status_area_widget_delegate.h

Issue 2709593002: Revert of 'Signin screen and locked screen status area focus advancing' (Closed)
Patch Set: revert 2295843006 Created 3 years, 10 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 | « no previous file | ash/common/system/status_area_widget_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 (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 #ifndef ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ 5 #ifndef ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
6 #define ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ 6 #define ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/public/cpp/shelf_types.h" 9 #include "ash/public/cpp/shelf_types.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 void AddTray(views::View* tray); 26 void AddTray(views::View* tray);
27 27
28 // Called whenever layout might change (e.g. alignment changed). 28 // Called whenever layout might change (e.g. alignment changed).
29 void UpdateLayout(); 29 void UpdateLayout();
30 30
31 // Sets the focus cycler. 31 // Sets the focus cycler.
32 void SetFocusCyclerForTesting(const FocusCycler* focus_cycler); 32 void SetFocusCyclerForTesting(const FocusCycler* focus_cycler);
33 33
34 void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; } 34 void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; }
35 35
36 void set_custom_focus_traversable(
37 views::FocusTraversable* custom_focus_traversable) {
38 custom_focus_traversable_ = custom_focus_traversable;
39 }
40
41 void set_default_last_focusable_child(bool default_last_focusable_child) {
42 default_last_focusable_child_ = default_last_focusable_child;
43 }
44
45 // Overridden from views::AccessiblePaneView. 36 // Overridden from views::AccessiblePaneView.
46 View* GetDefaultFocusableChild() override; 37 View* GetDefaultFocusableChild() override;
47 views::FocusSearch* GetFocusSearch() override;
48 views::FocusTraversable* GetFocusTraversableParent() override;
49 views::View* GetFocusTraversableParentView() override;
50 38
51 // Overridden from views::View: 39 // Overridden from views::View:
52 views::Widget* GetWidget() override; 40 views::Widget* GetWidget() override;
53 const views::Widget* GetWidget() const override; 41 const views::Widget* GetWidget() const override;
54 42
55 // Overridden from ui::EventHandler: 43 // Overridden from ui::EventHandler:
56 void OnGestureEvent(ui::GestureEvent* event) override; 44 void OnGestureEvent(ui::GestureEvent* event) override;
57 45
58 // views::WidgetDelegate overrides: 46 // views::WidgetDelegate overrides:
59 bool CanActivate() const override; 47 bool CanActivate() const override;
60 void DeleteDelegate() override; 48 void DeleteDelegate() override;
61 49
62 protected: 50 protected:
63 // Overridden from views::View: 51 // Overridden from views::View:
64 void ChildPreferredSizeChanged(views::View* child) override; 52 void ChildPreferredSizeChanged(views::View* child) override;
65 void ChildVisibilityChanged(views::View* child) override; 53 void ChildVisibilityChanged(views::View* child) override;
66 54
67 private: 55 private:
68 void UpdateWidgetSize(); 56 void UpdateWidgetSize();
69 57
70 // Sets a border on |child|. If |extend_border_to_edge| is true, then an extra 58 // Sets a border on |child|. If |extend_border_to_edge| is true, then an extra
71 // wide border is added to extend the view's hit region to the edge of the 59 // wide border is added to extend the view's hit region to the edge of the
72 // screen. 60 // screen.
73 void SetBorderOnChild(views::View* child, bool extend_border_to_edge); 61 void SetBorderOnChild(views::View* child, bool extend_border_to_edge);
74 62
75 views::FocusTraversable* custom_focus_traversable_ = nullptr;
76
77 // When true, the default focus of the status area widget is the last
78 // focusable child.
79 bool default_last_focusable_child_ = false;
80
81 const FocusCycler* focus_cycler_for_testing_; 63 const FocusCycler* focus_cycler_for_testing_;
82 64
83 // TODO(jamescook): Get this from WmShelf. 65 // TODO(jamescook): Get this from WmShelf.
84 ShelfAlignment alignment_; 66 ShelfAlignment alignment_;
85 67
86 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate); 68 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate);
87 }; 69 };
88 70
89 } // namespace ash 71 } // namespace ash
90 72
91 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ 73 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/status_area_widget_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698