| OLD | NEW |
| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 return color_utils::GetReadableColor(color, GetColor(security_level, | 261 return color_utils::GetReadableColor(color, GetColor(security_level, |
| 262 BACKGROUND)); | 262 BACKGROUND)); |
| 263 } | 263 } |
| 264 | 264 |
| 265 default: | 265 default: |
| 266 NOTREACHED(); | 266 NOTREACHED(); |
| 267 return GetColor(security_level, TEXT); | 267 return GetColor(security_level, TEXT); |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 // DropdownBarHost::Delegate |
| 272 void LocationBarView::set_animation_offset(int offset) { |
| 273 animation_offset_ = offset; |
| 274 } |
| 275 |
| 276 void LocationBarView::SetFocusAndSelection(bool select_all) { |
| 277 FocusLocation(select_all); |
| 278 } |
| 279 |
| 271 void LocationBarView::Update(const TabContents* tab_for_state_restoring) { | 280 void LocationBarView::Update(const TabContents* tab_for_state_restoring) { |
| 272 bool star_enabled = star_view_ && !model_->input_in_progress() && | 281 bool star_enabled = star_view_ && !model_->input_in_progress() && |
| 273 edit_bookmarks_enabled_.GetValue(); | 282 edit_bookmarks_enabled_.GetValue(); |
| 274 command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled); | 283 command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled); |
| 275 if (star_view_) | 284 if (star_view_) |
| 276 star_view_->SetVisible(star_enabled); | 285 star_view_->SetVisible(star_enabled); |
| 277 RefreshContentSettingViews(); | 286 RefreshContentSettingViews(); |
| 278 RefreshPageActionViews(); | 287 RefreshPageActionViews(); |
| 279 // Don't Update in app launcher mode so that the location entry does not show | 288 // Don't Update in app launcher mode so that the location entry does not show |
| 280 // a URL or security background. | 289 // a URL or security background. |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 Update(NULL); | 1207 Update(NULL); |
| 1199 } | 1208 } |
| 1200 } | 1209 } |
| 1201 | 1210 |
| 1202 #if defined(OS_WIN) | 1211 #if defined(OS_WIN) |
| 1203 bool LocationBarView::HasValidSuggestText() const { | 1212 bool LocationBarView::HasValidSuggestText() const { |
| 1204 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && | 1213 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && |
| 1205 !suggested_text_view_->GetText().empty(); | 1214 !suggested_text_view_->GetText().empty(); |
| 1206 } | 1215 } |
| 1207 #endif | 1216 #endif |
| OLD | NEW |