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

Side by Side Diff: chrome/browser/ui/views/find_bar_view.cc

Issue 2625273002: Migrate more vector icons to chrome/. (Closed)
Patch Set: fix mac 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 unified diff | Download patch
OLDNEW
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/find_bar_view.h" 5 #include "chrome/browser/ui/views/find_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/number_formatting.h" 9 #include "base/i18n/number_formatting.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "chrome/app/vector_icons/vector_icons.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/themes/theme_properties.h" 15 #include "chrome/browser/themes/theme_properties.h"
15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 16 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
16 #include "chrome/browser/ui/find_bar/find_bar_state.h" 17 #include "chrome/browser/ui/find_bar/find_bar_state.h"
17 #include "chrome/browser/ui/find_bar/find_bar_state_factory.h" 18 #include "chrome/browser/ui/find_bar/find_bar_state_factory.h"
18 #include "chrome/browser/ui/find_bar/find_notification_details.h" 19 #include "chrome/browser/ui/find_bar/find_notification_details.h"
19 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 20 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
20 #include "chrome/browser/ui/view_ids.h" 21 #include "chrome/browser/ui/view_ids.h"
21 #include "chrome/browser/ui/views/find_bar_host.h" 22 #include "chrome/browser/ui/views/find_bar_host.h"
22 #include "chrome/browser/ui/views/frame/browser_view.h" 23 #include "chrome/browser/ui/views/frame/browser_view.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 find_previous_button_(new views::VectorIconButton(this)), 120 find_previous_button_(new views::VectorIconButton(this)),
120 find_next_button_(new views::VectorIconButton(this)), 121 find_next_button_(new views::VectorIconButton(this)),
121 close_button_(new views::VectorIconButton(this)) { 122 close_button_(new views::VectorIconButton(this)) {
122 find_text_->set_id(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD); 123 find_text_->set_id(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
123 find_text_->set_default_width_in_chars(kDefaultCharWidth); 124 find_text_->set_default_width_in_chars(kDefaultCharWidth);
124 find_text_->set_controller(this); 125 find_text_->set_controller(this);
125 find_text_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FIND)); 126 find_text_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FIND));
126 find_text_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF); 127 find_text_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF);
127 AddChildView(find_text_); 128 AddChildView(find_text_);
128 129
129 find_previous_button_->SetIcon(gfx::VectorIconId::FIND_PREV); 130 find_previous_button_->SetIcon(kCaretUpIcon);
130 find_next_button_->SetIcon(gfx::VectorIconId::FIND_NEXT); 131 find_next_button_->SetIcon(kCaretDownIcon);
131 close_button_->SetIcon(gfx::VectorIconId::BAR_CLOSE); 132 close_button_->SetIcon(gfx::VectorIconId::BAR_CLOSE);
132 133
133 find_previous_button_->set_id(VIEW_ID_FIND_IN_PAGE_PREVIOUS_BUTTON); 134 find_previous_button_->set_id(VIEW_ID_FIND_IN_PAGE_PREVIOUS_BUTTON);
134 find_previous_button_->SetFocusForPlatform(); 135 find_previous_button_->SetFocusForPlatform();
135 find_previous_button_->SetTooltipText( 136 find_previous_button_->SetTooltipText(
136 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP)); 137 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP));
137 find_previous_button_->SetAccessibleName( 138 find_previous_button_->SetAccessibleName(
138 l10n_util::GetStringUTF16(IDS_ACCNAME_PREVIOUS)); 139 l10n_util::GetStringUTF16(IDS_ACCNAME_PREVIOUS));
139 AddChildView(find_previous_button_); 140 AddChildView(find_previous_button_);
140 141
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 set_background(new views::BubbleBackground(border.get())); 417 set_background(new views::BubbleBackground(border.get()));
417 SetBorder(std::move(border)); 418 SetBorder(std::move(border));
418 419
419 match_count_text_->SetBackgroundColor(bg_color); 420 match_count_text_->SetBackgroundColor(bg_color);
420 SkColor text_color = 421 SkColor text_color =
421 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor); 422 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor);
422 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69)); 423 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69));
423 separator_->SetColor(SkColorSetA(text_color, 0x26)); 424 separator_->SetColor(SkColorSetA(text_color, 0x26));
424 } 425 }
425 426
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | ui/gfx/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698