| 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_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 // DropdownBarHostDelegate | 388 // DropdownBarHostDelegate |
| 389 void LocationBarView::SetFocusAndSelection(bool select_all) { | 389 void LocationBarView::SetFocusAndSelection(bool select_all) { |
| 390 FocusLocation(select_all); | 390 FocusLocation(select_all); |
| 391 } | 391 } |
| 392 | 392 |
| 393 void LocationBarView::SetAnimationOffset(int offset) { | 393 void LocationBarView::SetAnimationOffset(int offset) { |
| 394 animation_offset_ = offset; | 394 animation_offset_ = offset; |
| 395 } | 395 } |
| 396 | 396 |
| 397 void LocationBarView::ModeChanged(const chrome::search::Mode& mode) { | 397 void LocationBarView::ModeChanged(const chrome::search::Mode& old_mode, |
| 398 const chrome::search::Mode& new_mode) { |
| 398 #if defined(USE_AURA) | 399 #if defined(USE_AURA) |
| 399 if (mode.is_search() && mode.animate) { | 400 if (new_mode.is_search() && new_mode.animate) { |
| 400 // Fade in so the icons don't pop. | 401 // Fade in so the icons don't pop. |
| 401 StartFadeAnimation(); | 402 StartFadeAnimation(); |
| 402 } else { | 403 } else { |
| 403 // Cancel any pending animations; switch to the final state immediately. | 404 // Cancel any pending animations; switch to the final state immediately. |
| 404 StopFadeAnimation(); | 405 StopFadeAnimation(); |
| 405 } | 406 } |
| 406 #endif | 407 #endif |
| 407 } | 408 } |
| 408 | 409 |
| 409 void LocationBarView::Update(const WebContents* tab_for_state_restoring) { | 410 void LocationBarView::Update(const WebContents* tab_for_state_restoring) { |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 } | 1526 } |
| 1526 | 1527 |
| 1527 void LocationBarView::CleanupFadeAnimation() { | 1528 void LocationBarView::CleanupFadeAnimation() { |
| 1528 // Since we're no longer animating we don't need our layer. | 1529 // Since we're no longer animating we don't need our layer. |
| 1529 SetPaintToLayer(false); | 1530 SetPaintToLayer(false); |
| 1530 // Bubble labels don't need a transparent background anymore. | 1531 // Bubble labels don't need a transparent background anymore. |
| 1531 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1532 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1532 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1533 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1533 } | 1534 } |
| 1534 #endif // USE_AURA | 1535 #endif // USE_AURA |
| OLD | NEW |