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 "chrome/browser/ui/views/location_bar/location_bar_container.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_container.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
8 #include "chrome/browser/ui/webui/instant_ui.h" | 8 #include "chrome/browser/ui/webui/instant_ui.h" |
| 9 #include "ui/base/event.h" |
9 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
10 #include "ui/views/layout/fill_layout.h" | 11 #include "ui/views/layout/fill_layout.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 // Duration of the animations used by this class (AnimateTo()). | 15 // Duration of the animations used by this class (AnimateTo()). |
15 const int kAnimationDuration = 180; | 16 const int kAnimationDuration = 180; |
16 | 17 |
17 } | 18 } |
18 | 19 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 60 |
60 std::string LocationBarContainer::GetClassName() const { | 61 std::string LocationBarContainer::GetClassName() const { |
61 return "browser/ui/views/location_bar/LocationBarContainer"; | 62 return "browser/ui/views/location_bar/LocationBarContainer"; |
62 } | 63 } |
63 | 64 |
64 gfx::Size LocationBarContainer::GetPreferredSize() { | 65 gfx::Size LocationBarContainer::GetPreferredSize() { |
65 return location_bar_view_->GetPreferredSize(); | 66 return location_bar_view_->GetPreferredSize(); |
66 } | 67 } |
67 | 68 |
68 bool LocationBarContainer::SkipDefaultKeyEventProcessing( | 69 bool LocationBarContainer::SkipDefaultKeyEventProcessing( |
69 const views::KeyEvent& event) { | 70 const ui::KeyEvent& event) { |
70 return location_bar_view_->SkipDefaultKeyEventProcessing(event); | 71 return location_bar_view_->SkipDefaultKeyEventProcessing(event); |
71 } | 72 } |
72 | 73 |
73 void LocationBarContainer::GetAccessibleState( | 74 void LocationBarContainer::GetAccessibleState( |
74 ui::AccessibleViewState* state) { | 75 ui::AccessibleViewState* state) { |
75 location_bar_view_->GetAccessibleState(state); | 76 location_bar_view_->GetAccessibleState(state); |
76 } | 77 } |
77 | 78 |
78 void LocationBarContainer::OnBoundsAnimatorDone( | 79 void LocationBarContainer::OnBoundsAnimatorDone( |
79 views::BoundsAnimator* animator) { | 80 views::BoundsAnimator* animator) { |
80 SetInToolbar(true); | 81 SetInToolbar(true); |
81 } | 82 } |
82 | 83 |
83 // static | 84 // static |
84 int LocationBarContainer::GetAnimationDuration() { | 85 int LocationBarContainer::GetAnimationDuration() { |
85 return kAnimationDuration * InstantUI::GetSlowAnimationScaleFactor(); | 86 return kAnimationDuration * InstantUI::GetSlowAnimationScaleFactor(); |
86 } | 87 } |
OLD | NEW |