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

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

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 DeletePageActionViews(); // Delete the old views (if any). 961 DeletePageActionViews(); // Delete the old views (if any).
962 962
963 page_action_views_.resize(page_actions.size()); 963 page_action_views_.resize(page_actions.size());
964 964
965 // Add the page actions in reverse order, so that the child views are 965 // Add the page actions in reverse order, so that the child views are
966 // inserted in left-to-right order for accessibility. 966 // inserted in left-to-right order for accessibility.
967 for (int i = page_actions.size() - 1; i >= 0; --i) { 967 for (int i = page_actions.size() - 1; i >= 0; --i) {
968 page_action_views_[i] = new PageActionWithBadgeView( 968 page_action_views_[i] = new PageActionWithBadgeView(
969 new PageActionImageView(this, profile_, page_actions[i])); 969 new PageActionImageView(this, profile_, page_actions[i]));
970 page_action_views_[i]->SetVisible(false); 970 page_action_views_[i]->SetVisible(false);
971 AddChildView(GetChildIndex(star_view_), page_action_views_[i]); 971 AddChildViewAt(page_action_views_[i], GetIndexOf(star_view_));
972 } 972 }
973 } 973 }
974 974
975 TabContents* contents = GetTabContentsFromDelegate(delegate_); 975 TabContents* contents = GetTabContentsFromDelegate(delegate_);
976 if (!page_action_views_.empty() && contents) { 976 if (!page_action_views_.empty() && contents) {
977 GURL url = GURL(WideToUTF8(model_->GetText())); 977 GURL url = GURL(WideToUTF8(model_->GetText()));
978 978
979 for (PageActionViews::const_iterator i(page_action_views_.begin()); 979 for (PageActionViews::const_iterator i(page_action_views_.begin());
980 i != page_action_views_.end(); ++i) { 980 i != page_action_views_.end(); ++i) {
981 (*i)->UpdateVisibility(model_->input_in_progress() ? NULL : contents, 981 (*i)->UpdateVisibility(model_->input_in_progress() ? NULL : contents,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 template_url_model_ = NULL; 1222 template_url_model_ = NULL;
1223 ShowFirstRunBubble(bubble_type_); 1223 ShowFirstRunBubble(bubble_type_);
1224 } 1224 }
1225 1225
1226 #if defined(OS_WIN) 1226 #if defined(OS_WIN)
1227 bool LocationBarView::HasValidSuggestText() { 1227 bool LocationBarView::HasValidSuggestText() {
1228 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1228 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1229 !suggested_text_view_->GetText().empty(); 1229 !suggested_text_view_->GetText().empty();
1230 } 1230 }
1231 #endif 1231 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/location_bar/page_action_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698