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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 10828193: Revert 148511 - Add pin icon to the omnibar in windows 8 metro mode. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
===================================================================
--- chrome/browser/ui/views/location_bar/location_bar_view.cc (revision 150228)
+++ chrome/browser/ui/views/location_bar/location_bar_view.cc (working copy)
@@ -42,7 +42,6 @@
#include "chrome/browser/ui/views/location_bar/ev_bubble_view.h"
#include "chrome/browser/ui/views/location_bar/keyword_hint_view.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
-#include "chrome/browser/ui/views/location_bar/metro_pin_view.h"
#include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
#include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h"
#include "chrome/browser/ui/views/location_bar/selected_keyword_view.h"
@@ -77,10 +76,6 @@
#include "ui/views/controls/label.h"
#include "ui/views/widget/widget.h"
-#if defined(OS_WIN)
-#include "base/win/metro.h"
-#endif
-
#if defined(OS_WIN) && !defined(USE_AURA)
#include "chrome/browser/ui/views/omnibox/omnibox_view_win.h"
#endif
@@ -188,7 +183,6 @@
star_view_(NULL),
action_box_button_view_(NULL),
chrome_to_mobile_view_(NULL),
- metro_pin_view_(NULL),
mode_(mode),
show_focus_rect_(false),
template_url_service_(NULL),
@@ -237,6 +231,7 @@
location_icon_view_ = new LocationIconView(this);
AddChildView(location_icon_view_);
+ location_icon_view_->SetVisible(true);
location_icon_view_->set_drag_controller(this);
ev_bubble_view_ =
@@ -287,16 +282,8 @@
// hidden in popups and in the app launcher.
star_view_ = new StarView(command_updater_);
AddChildView(star_view_);
+ star_view_->SetVisible(true);
- // Add the metro pin view, if this is windows and we are running in Metro
- // mode.
-#if defined(OS_WIN)
- if (base::win::IsMetroProcess()) {
- metro_pin_view_ = new MetroPinView(command_updater_);
- AddChildView(metro_pin_view_);
- }
-#endif
-
// Also disable Chrome To Mobile for off-the-record and non-synced profiles,
// or if the feature is disabled by a command line flag or chrome://flags.
if (!profile_->IsOffTheRecord() && profile_->IsSyncAccessible() &&
@@ -515,11 +502,6 @@
chrome::ShowBookmarkBubbleView(star_view_, profile_, url, newly_bookmarked);
}
-void LocationBarView::SetMetroPinnedState(bool is_pinned) {
- if (metro_pin_view_)
- metro_pin_view_->SetIsPinned(is_pinned);
-}
-
void LocationBarView::SetZoomIconTooltipPercent(int zoom_percent) {
zoom_view_->SetZoomIconTooltipPercent(zoom_percent);
}
@@ -674,9 +656,6 @@
if (star_view_ && star_view_->visible())
entry_width -= star_view_->GetPreferredSize().width() + GetItemPadding();
- if (metro_pin_view_ && metro_pin_view_->visible())
- entry_width -= metro_pin_view_->GetPreferredSize().width() +
- GetItemPadding();
if (chrome_to_mobile_view_ && chrome_to_mobile_view_->visible()) {
entry_width -= chrome_to_mobile_view_->GetPreferredSize().width() +
GetItemPadding();
@@ -765,14 +744,6 @@
offset -= GetItemPadding() - star_view_->GetBuiltInHorizontalPadding();
}
- if (metro_pin_view_ && metro_pin_view_->visible()) {
- offset += metro_pin_view_->GetBuiltInHorizontalPadding();
- int pin_width = metro_pin_view_->GetPreferredSize().width();
- offset -= pin_width;
- metro_pin_view_->SetBounds(offset, location_y, pin_width, location_height);
- offset -= GetItemPadding() - metro_pin_view_->GetBuiltInHorizontalPadding();
- }
-
if (chrome_to_mobile_view_ && chrome_to_mobile_view_->visible()) {
offset += chrome_to_mobile_view_->GetBuiltInHorizontalPadding();
int icon_width = chrome_to_mobile_view_->GetPreferredSize().width();
@@ -1158,8 +1129,6 @@
page_action_views_.resize(page_actions_.size());
View* right_anchor = chrome_to_mobile_view_;
if (!right_anchor)
- right_anchor = metro_pin_view_;
- if (!right_anchor)
right_anchor = star_view_;
if (!right_anchor)
right_anchor = action_box_button_view_;
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/location_bar/metro_pin_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698