Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 10831308: Revert 151036 - Speculative revert to see if this change introduced a performance regression on Mac… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 for (int i = page_actions_.size() - 1; i >= 0; --i) { 1140 for (int i = page_actions_.size() - 1; i >= 0; --i) {
1141 page_action_views_[i] = new PageActionWithBadgeView( 1141 page_action_views_[i] = new PageActionWithBadgeView(
1142 delegate_->CreatePageActionImageView(this, page_actions_[i])); 1142 delegate_->CreatePageActionImageView(this, page_actions_[i]));
1143 page_action_views_[i]->SetVisible(false); 1143 page_action_views_[i]->SetVisible(false);
1144 AddChildViewAt(page_action_views_[i], GetIndexOf(right_anchor)); 1144 AddChildViewAt(page_action_views_[i], GetIndexOf(right_anchor));
1145 } 1145 }
1146 } 1146 }
1147 1147
1148 WebContents* contents = GetWebContentsFromDelegate(delegate_); 1148 WebContents* contents = GetWebContentsFromDelegate(delegate_);
1149 if (!page_action_views_.empty() && contents) { 1149 if (!page_action_views_.empty() && contents) {
1150 Browser* browser = 1150 Browser* browser = browser::FindBrowserWithWebContents(contents);
1151 browser::FindBrowserForController(&contents->GetController(), NULL);
1152 GURL url = chrome::GetActiveWebContents(browser)->GetURL(); 1151 GURL url = chrome::GetActiveWebContents(browser)->GetURL();
1153 1152
1154 for (PageActionViews::const_iterator i(page_action_views_.begin()); 1153 for (PageActionViews::const_iterator i(page_action_views_.begin());
1155 i != page_action_views_.end(); ++i) { 1154 i != page_action_views_.end(); ++i) {
1156 (*i)->UpdateVisibility(model_->input_in_progress() ? NULL : contents, 1155 (*i)->UpdateVisibility(model_->input_in_progress() ? NULL : contents,
1157 url); 1156 url);
1158 1157
1159 // Check if the visibility of the action changed and notify if it did. 1158 // Check if the visibility of the action changed and notify if it did.
1160 ExtensionAction* action = (*i)->image_view()->page_action(); 1159 ExtensionAction* action = (*i)->image_view()->page_action();
1161 if (old_visibility.find(action) == old_visibility.end() || 1160 if (old_visibility.find(action) == old_visibility.end() ||
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 } 1498 }
1500 1499
1501 void LocationBarView::CleanupFadeAnimation() { 1500 void LocationBarView::CleanupFadeAnimation() {
1502 // Since we're no longer animating we don't need our layer. 1501 // Since we're no longer animating we don't need our layer.
1503 SetPaintToLayer(false); 1502 SetPaintToLayer(false);
1504 // Bubble labels don't need a transparent background anymore. 1503 // Bubble labels don't need a transparent background anymore.
1505 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1504 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1506 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1505 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1507 } 1506 }
1508 #endif // USE_AURA 1507 #endif // USE_AURA
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_controller.cc ('k') | chrome/browser/ui/views/sad_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698