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

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

Issue 768413003: TEST ONLY - DO NOT SUBMIT - FOR TRYBOTS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad merge Created 5 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/search_button.cc
diff --git a/chrome/browser/ui/views/location_bar/search_button.cc b/chrome/browser/ui/views/location_bar/search_button.cc
deleted file mode 100644
index b069e8e4954f8b8f7e1abaed485ea22905998838..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/location_bar/search_button.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/location_bar/search_button.h"
-
-#include "grit/theme_resources.h"
-#include "ui/base/theme_provider.h"
-#include "ui/views/controls/button/label_button_border.h"
-
-SearchButton::SearchButton(views::ButtonListener* listener)
- : views::LabelButton(listener, base::string16()) {
- EnableCanvasFlippingForRTLUI(true);
- set_triggerable_event_flags(
- ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON);
- SetStyle(views::Button::STYLE_BUTTON);
- SetFocusable(false);
- SetMinSize(gfx::Size());
- scoped_ptr<views::LabelButtonBorder> border(
- new views::LabelButtonBorder(style()));
- border->set_insets(gfx::Insets());
- const int kSearchButtonNormalImages[] = IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON);
- border->SetPainter(
- false, views::Button::STATE_NORMAL,
- views::Painter::CreateImageGridPainter(kSearchButtonNormalImages));
- const int kSearchButtonHoveredImages[] =
- IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON_HOVER);
- border->SetPainter(
- false, views::Button::STATE_HOVERED,
- views::Painter::CreateImageGridPainter(kSearchButtonHoveredImages));
- const int kSearchButtonPressedImages[] =
- IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON_PRESSED);
- border->SetPainter(
- false, views::Button::STATE_PRESSED,
- views::Painter::CreateImageGridPainter(kSearchButtonPressedImages));
- border->SetPainter(false, views::Button::STATE_DISABLED, NULL);
- border->SetPainter(true, views::Button::STATE_NORMAL, NULL);
- border->SetPainter(true, views::Button::STATE_HOVERED, NULL);
- border->SetPainter(true, views::Button::STATE_PRESSED, NULL);
- border->SetPainter(true, views::Button::STATE_DISABLED, NULL);
- SetBorder(border.Pass());
- const int kSearchButtonWidth = 56;
- SetMinSize(gfx::Size(kSearchButtonWidth, 0));
-}
-
-SearchButton::~SearchButton() {
-}
-
-void SearchButton::UpdateIcon(bool is_search) {
- SetImage(
- views::Button::STATE_NORMAL,
- *GetThemeProvider()->GetImageSkiaNamed(is_search ?
- IDR_OMNIBOX_SEARCH_BUTTON_LOUPE : IDR_OMNIBOX_SEARCH_BUTTON_ARROW));
- // Flip the arrow for RTL, but not the loupe.
- image()->EnableCanvasFlippingForRTLUI(!is_search);
-}
« no previous file with comments | « chrome/browser/ui/views/location_bar/search_button.h ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698