OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/views/dropdown_bar_host.h" | 5 #include "chrome/browser/views/dropdown_bar_host.h" |
6 | 6 |
7 #include "app/slide_animation.h" | 7 #include "app/slide_animation.h" |
8 #include "base/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
9 #include "base/scoped_handle.h" | 9 #include "base/scoped_handle.h" |
10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 animation_->Show(); | 85 animation_->Show(); |
86 } | 86 } |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 void DropdownBarHost::SetFocusAndSelection() { | 90 void DropdownBarHost::SetFocusAndSelection() { |
91 view_->SetFocusAndSelection(true); | 91 view_->SetFocusAndSelection(true); |
92 } | 92 } |
93 | 93 |
94 bool DropdownBarHost::IsAnimating() const { | 94 bool DropdownBarHost::IsAnimating() const { |
95 return animation_->IsAnimating(); | 95 return animation_->is_animating(); |
96 } | 96 } |
97 | 97 |
98 void DropdownBarHost::Hide(bool animate) { | 98 void DropdownBarHost::Hide(bool animate) { |
99 if (!IsVisible()) | 99 if (!IsVisible()) |
100 return; | 100 return; |
101 if (animate && !disable_animations_during_testing_) { | 101 if (animate && !disable_animations_during_testing_) { |
102 animation_->Reset(1.0); | 102 animation_->Reset(1.0); |
103 animation_->Hide(); | 103 animation_->Hide(); |
104 } else { | 104 } else { |
105 StopAnimation(); | 105 StopAnimation(); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 focus_manager_->RegisterAccelerator(escape, this); | 308 focus_manager_->RegisterAccelerator(escape, this); |
309 esc_accel_target_registered_ = true; | 309 esc_accel_target_registered_ = true; |
310 } | 310 } |
311 | 311 |
312 void DropdownBarHost::UnregisterAccelerators() { | 312 void DropdownBarHost::UnregisterAccelerators() { |
313 DCHECK(esc_accel_target_registered_); | 313 DCHECK(esc_accel_target_registered_); |
314 views::Accelerator escape(base::VKEY_ESCAPE, false, false, false); | 314 views::Accelerator escape(base::VKEY_ESCAPE, false, false, false); |
315 focus_manager_->UnregisterAccelerator(escape, this); | 315 focus_manager_->UnregisterAccelerator(escape, this); |
316 esc_accel_target_registered_ = false; | 316 esc_accel_target_registered_ = false; |
317 } | 317 } |
OLD | NEW |