| 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/common/system/status_area_widget_delegate.h" | 5 #include "ash/common/system/status_area_widget_delegate.h" |
| 6 | 6 |
| 7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
| 8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
| 9 #include "ash/common/focus_cycler.h" | 9 #include "ash/common/focus_cycler.h" |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 void StatusAreaWidgetDelegate::SetFocusCyclerForTesting( | 67 void StatusAreaWidgetDelegate::SetFocusCyclerForTesting( |
| 68 const FocusCycler* focus_cycler) { | 68 const FocusCycler* focus_cycler) { |
| 69 focus_cycler_for_testing_ = focus_cycler; | 69 focus_cycler_for_testing_ = focus_cycler; |
| 70 } | 70 } |
| 71 | 71 |
| 72 views::View* StatusAreaWidgetDelegate::GetDefaultFocusableChild() { | 72 views::View* StatusAreaWidgetDelegate::GetDefaultFocusableChild() { |
| 73 return child_at(0); | 73 return child_at(0); |
| 74 } | 74 } |
| 75 | 75 |
| 76 views::FocusSearch* StatusAreaWidgetDelegate::GetFocusSearch() { |
| 77 return custom_focus_traversable_ ? custom_focus_traversable_->GetFocusSearch() |
| 78 : AccessiblePaneView::GetFocusSearch(); |
| 79 } |
| 80 |
| 81 views::FocusTraversable* StatusAreaWidgetDelegate::GetFocusTraversableParent() { |
| 82 return custom_focus_traversable_ |
| 83 ? custom_focus_traversable_->GetFocusTraversableParent() |
| 84 : AccessiblePaneView::GetFocusTraversableParent(); |
| 85 } |
| 86 |
| 87 views::View* StatusAreaWidgetDelegate::GetFocusTraversableParentView() { |
| 88 return custom_focus_traversable_ |
| 89 ? custom_focus_traversable_->GetFocusTraversableParentView() |
| 90 : AccessiblePaneView::GetFocusTraversableParentView(); |
| 91 } |
| 92 |
| 76 views::Widget* StatusAreaWidgetDelegate::GetWidget() { | 93 views::Widget* StatusAreaWidgetDelegate::GetWidget() { |
| 77 return View::GetWidget(); | 94 return View::GetWidget(); |
| 78 } | 95 } |
| 79 | 96 |
| 80 const views::Widget* StatusAreaWidgetDelegate::GetWidget() const { | 97 const views::Widget* StatusAreaWidgetDelegate::GetWidget() const { |
| 81 return View::GetWidget(); | 98 return View::GetWidget(); |
| 82 } | 99 } |
| 83 | 100 |
| 84 void StatusAreaWidgetDelegate::OnGestureEvent(ui::GestureEvent* event) { | 101 void StatusAreaWidgetDelegate::OnGestureEvent(ui::GestureEvent* event) { |
| 85 views::Widget* target_widget = | 102 views::Widget* target_widget = |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 248 } |
| 232 child->SetBorder(views::Border::CreateEmptyBorder(top_edge, left_edge, | 249 child->SetBorder(views::Border::CreateEmptyBorder(top_edge, left_edge, |
| 233 bottom_edge, right_edge)); | 250 bottom_edge, right_edge)); |
| 234 // Layout on |child| needs to be updated based on new border value before | 251 // Layout on |child| needs to be updated based on new border value before |
| 235 // displaying; otherwise |child| will be showing with old border size. | 252 // displaying; otherwise |child| will be showing with old border size. |
| 236 // Fix for crbug.com/623438. | 253 // Fix for crbug.com/623438. |
| 237 child->Layout(); | 254 child->Layout(); |
| 238 } | 255 } |
| 239 | 256 |
| 240 } // namespace ash | 257 } // namespace ash |
| OLD | NEW |