| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) { | 306 if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) { |
| 307 // Note: condition above means that the star icon is hidden in popups and in | 307 // Note: condition above means that the star icon is hidden in popups and in |
| 308 // the app launcher. | 308 // the app launcher. |
| 309 star_view_ = new StarView(command_updater_); | 309 star_view_ = new StarView(command_updater_); |
| 310 AddChildView(star_view_); | 310 AddChildView(star_view_); |
| 311 star_view_->SetVisible(true); | 311 star_view_->SetVisible(true); |
| 312 } | 312 } |
| 313 if (extensions::switch_utils::IsActionBoxEnabled() && browser_) { | 313 if (extensions::switch_utils::IsActionBoxEnabled() && browser_) { |
| 314 action_box_button_view_ = new ActionBoxButtonView(browser_); | 314 action_box_button_view_ = new ActionBoxButtonView(browser_); |
| 315 AddChildView(action_box_button_view_); | 315 AddChildView(action_box_button_view_); |
| 316 gfx::Size menu_offset( |
| 317 (mode_ == NORMAL) ? kNormalHorizontalEdgeThickness : 0, |
| 318 kVerticalEdgeThickness); |
| 319 action_box_button_view_->SetMenuOffset(menu_offset); |
| 320 |
| 316 if (star_view_) | 321 if (star_view_) |
| 317 star_view_->SetVisible(false); | 322 star_view_->SetVisible(false); |
| 318 } | 323 } |
| 319 | 324 |
| 320 registrar_.Add(this, | 325 registrar_.Add(this, |
| 321 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED, | 326 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED, |
| 322 content::Source<Profile>(profile_)); | 327 content::Source<Profile>(profile_)); |
| 323 | 328 |
| 324 // Initialize the location entry. We do this to avoid a black flash which is | 329 // Initialize the location entry. We do this to avoid a black flash which is |
| 325 // visible when the location entry has just been initialized. | 330 // visible when the location entry has just been initialized. |
| (...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 } | 1556 } |
| 1552 | 1557 |
| 1553 void LocationBarView::CleanupFadeAnimation() { | 1558 void LocationBarView::CleanupFadeAnimation() { |
| 1554 // Since we're no longer animating we don't need our layer. | 1559 // Since we're no longer animating we don't need our layer. |
| 1555 SetPaintToLayer(false); | 1560 SetPaintToLayer(false); |
| 1556 // Bubble labels don't need a transparent background anymore. | 1561 // Bubble labels don't need a transparent background anymore. |
| 1557 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1562 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1558 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1563 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1559 } | 1564 } |
| 1560 #endif // USE_AURA | 1565 #endif // USE_AURA |
| OLD | NEW |