| Index: ui/views/view.cc
|
| diff --git a/ui/views/view.cc b/ui/views/view.cc
|
| index f74d0f9e79014748448da8bbece2de023ab2217d..1f6ffaa90a2dab1037cdc7e377ed07e78da9d957 100644
|
| --- a/ui/views/view.cc
|
| +++ b/ui/views/view.cc
|
| @@ -453,6 +453,7 @@ void View::SetVisible(bool visible) {
|
| SchedulePaint();
|
|
|
| visible_ = visible;
|
| + ReviseFocusedView();
|
|
|
| // Notify the parent.
|
| if (parent_)
|
| @@ -475,6 +476,7 @@ bool View::IsDrawn() const {
|
| void View::SetEnabled(bool enabled) {
|
| if (enabled != enabled_) {
|
| enabled_ = enabled;
|
| + ReviseFocusedView();
|
| OnEnabledChanged();
|
| }
|
| }
|
| @@ -1205,6 +1207,14 @@ void View::SetNextFocusableView(View* view) {
|
| next_focusable_view_ = view;
|
| }
|
|
|
| +void View::SetFocusable(bool focusable) {
|
| + if (focusable_ == focusable)
|
| + return;
|
| +
|
| + focusable_ = focusable;
|
| + ReviseFocusedView();
|
| +}
|
| +
|
| bool View::IsFocusable() const {
|
| return focusable_ && enabled_ && IsDrawn();
|
| }
|
| @@ -1213,6 +1223,14 @@ bool View::IsAccessibilityFocusable() const {
|
| return (focusable_ || accessibility_focusable_) && enabled_ && IsDrawn();
|
| }
|
|
|
| +void View::SetAccessibilityFocusable(bool accessibility_focusable) {
|
| + if (accessibility_focusable_ == accessibility_focusable)
|
| + return;
|
| +
|
| + accessibility_focusable_ = accessibility_focusable;
|
| + ReviseFocusedView();
|
| +}
|
| +
|
| FocusManager* View::GetFocusManager() {
|
| Widget* widget = GetWidget();
|
| return widget ? widget->GetFocusManager() : NULL;
|
| @@ -2336,6 +2354,12 @@ void View::InitFocusSiblings(View* v, int index) {
|
| }
|
| }
|
|
|
| +void View::ReviseFocusedView() {
|
| + FocusManager* focus_manager = GetFocusManager();
|
| + if (focus_manager)
|
| + focus_manager->ReviseFocusedView();
|
| +}
|
| +
|
| // System events ---------------------------------------------------------------
|
|
|
| void View::PropagateThemeChanged() {
|
|
|