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

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

Issue 2644903004: Move around more vector icons. (Closed)
Patch Set: fix comment Created 3 years, 11 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/zoom_view.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_view.cc b/chrome/browser/ui/views/location_bar/zoom_view.cc
index 38dd099eb97cc9fa9c4f1492530a0e0d025e1e0a..53c86cfc43effeb52b0e6faa908ef23c11f63f36 100644
--- a/chrome/browser/ui/views/location_bar/zoom_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/location_bar/zoom_view.h"
#include "base/i18n/number_formatting.h"
+#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
#include "chrome/grit/generated_resources.h"
@@ -14,13 +15,12 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/event.h"
#include "ui/gfx/geometry/size.h"
-#include "ui/gfx/vector_icons_public.h"
ZoomView::ZoomView(LocationBarView::Delegate* location_bar_delegate)
: BubbleIconView(nullptr, 0),
location_bar_delegate_(location_bar_delegate),
- image_id_(gfx::VectorIconId::VECTOR_ICON_NONE) {
- Update(NULL);
+ icon_(&kZoomMinusIcon) {
+ Update(nullptr);
}
ZoomView::~ZoomView() {
@@ -39,10 +39,10 @@ void ZoomView::Update(zoom::ZoomController* zoom_controller) {
base::FormatPercent(zoom_controller->GetZoomPercent())));
// The icon is hidden when the zoom level is default.
- image_id_ = zoom_controller->GetZoomRelativeToDefault() ==
- zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM
- ? gfx::VectorIconId::ZOOM_MINUS
- : gfx::VectorIconId::ZOOM_PLUS;
+ icon_ = zoom_controller->GetZoomRelativeToDefault() ==
+ zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM
+ ? &kZoomMinusIcon
+ : &kZoomPlusIcon;
if (GetNativeTheme())
UpdateIcon();
@@ -63,6 +63,6 @@ views::BubbleDialogDelegateView* ZoomView::GetBubble() const {
return ZoomBubbleView::GetZoomBubble();
}
-gfx::VectorIconId ZoomView::GetVectorIcon() const {
- return image_id_;
+const gfx::VectorIcon& ZoomView::GetVectorIcon() const {
+ return *icon_;
}
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_view.h ('k') | chrome/browser/ui/views/omnibox/omnibox_result_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698