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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 StartFadeAnimation(); | 391 StartFadeAnimation(); |
392 } else { | 392 } else { |
393 // Cancel any pending animations; switch to the final state immediately. | 393 // Cancel any pending animations; switch to the final state immediately. |
394 StopFadeAnimation(); | 394 StopFadeAnimation(); |
395 } | 395 } |
396 #endif | 396 #endif |
397 } | 397 } |
398 | 398 |
399 void LocationBarView::Update(const WebContents* tab_for_state_restoring) { | 399 void LocationBarView::Update(const WebContents* tab_for_state_restoring) { |
400 RefreshContentSettingViews(); | 400 RefreshContentSettingViews(); |
401 // If |tab_for_state_restoring| is non-NULL, a tab change has occurred, so the | |
402 // zoom bubble should be hidden since it represents the zoom on another tab. | |
Peter Kasting
2012/08/15 19:40:28
So, if we change URLs within the tab, and the new
Kyle Horimoto
2012/08/15 20:30:19
Actually, you're right. Probably better to get rid
| |
403 if (tab_for_state_restoring != NULL) | |
404 ZoomBubbleView::CloseBubble(); | |
401 zoom_view_->Update(); | 405 zoom_view_->Update(); |
Peter Kasting
2012/08/15 19:40:28
Having this call after CloseBubble() doesn't risk
Kyle Horimoto
2012/08/15 20:30:19
Nope!
| |
402 RefreshPageActionViews(); | 406 RefreshPageActionViews(); |
403 | 407 |
404 bool star_enabled = star_view_ && !model_->input_in_progress() && | 408 bool star_enabled = star_view_ && !model_->input_in_progress() && |
405 edit_bookmarks_enabled_.GetValue(); | 409 edit_bookmarks_enabled_.GetValue(); |
406 | 410 |
407 command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled); | 411 command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled); |
408 if (star_view_) | 412 if (star_view_) |
409 star_view_->SetVisible(star_enabled); | 413 star_view_->SetVisible(star_enabled); |
410 | 414 |
411 bool enabled = chrome_to_mobile_view_ && !model_->input_in_progress() && | 415 bool enabled = chrome_to_mobile_view_ && !model_->input_in_progress() && |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1499 } | 1503 } |
1500 | 1504 |
1501 void LocationBarView::CleanupFadeAnimation() { | 1505 void LocationBarView::CleanupFadeAnimation() { |
1502 // Since we're no longer animating we don't need our layer. | 1506 // Since we're no longer animating we don't need our layer. |
1503 SetPaintToLayer(false); | 1507 SetPaintToLayer(false); |
1504 // Bubble labels don't need a transparent background anymore. | 1508 // Bubble labels don't need a transparent background anymore. |
1505 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1509 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
1506 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1510 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
1507 } | 1511 } |
1508 #endif // USE_AURA | 1512 #endif // USE_AURA |
OLD | NEW |