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

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

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1141 }
1142 1142
1143 void LocationBarView::SaveStateToContents(TabContents* contents) { 1143 void LocationBarView::SaveStateToContents(TabContents* contents) {
1144 location_entry_->SaveStateToTab(contents); 1144 location_entry_->SaveStateToTab(contents);
1145 } 1145 }
1146 1146
1147 void LocationBarView::Revert() { 1147 void LocationBarView::Revert() {
1148 location_entry_->RevertAll(); 1148 location_entry_->RevertAll();
1149 } 1149 }
1150 1150
1151 const AutocompleteEditView* LocationBarView::location_entry() const {
1152 return location_entry_.get();
1153 }
1154
1155 AutocompleteEditView* LocationBarView::location_entry() {
1156 return location_entry_.get();
1157 }
1158
1159 LocationBarTesting* LocationBarView::GetLocationBarForTesting() {
1160 return this;
1161 }
1162
1163 int LocationBarView::PageActionCount() {
1164 return page_action_views_.size();
1165 }
1166
1151 int LocationBarView::PageActionVisibleCount() { 1167 int LocationBarView::PageActionVisibleCount() {
1152 int result = 0; 1168 int result = 0;
1153 for (size_t i = 0; i < page_action_views_.size(); i++) { 1169 for (size_t i = 0; i < page_action_views_.size(); i++) {
1154 if (page_action_views_[i]->IsVisible()) 1170 if (page_action_views_[i]->IsVisible())
1155 ++result; 1171 ++result;
1156 } 1172 }
1157 return result; 1173 return result;
1158 } 1174 }
1159 1175
1160 ExtensionAction* LocationBarView::GetPageAction(size_t index) { 1176 ExtensionAction* LocationBarView::GetPageAction(size_t index) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 template_url_model_ = NULL; 1218 template_url_model_ = NULL;
1203 ShowFirstRunBubble(bubble_type_); 1219 ShowFirstRunBubble(bubble_type_);
1204 } 1220 }
1205 1221
1206 #if defined(OS_WIN) 1222 #if defined(OS_WIN)
1207 bool LocationBarView::HasValidSuggestText() { 1223 bool LocationBarView::HasValidSuggestText() {
1208 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1224 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1209 !suggested_text_view_->GetText().empty(); 1225 !suggested_text_view_->GetText().empty();
1210 } 1226 }
1211 #endif 1227 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698