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

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

Issue 2667753006: Make new target for vector icon structs to replace ui/gfx/vector_icons/ (Closed)
Patch Set: fix deps Created 3 years, 10 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"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/ui/views/frame/browser_view.h" 23 #include "chrome/browser/ui/views/frame/browser_view.h"
24 #include "chrome/grit/generated_resources.h" 24 #include "chrome/grit/generated_resources.h"
25 #include "components/strings/grit/components_strings.h" 25 #include "components/strings/grit/components_strings.h"
26 #include "ui/base/ime/input_method.h" 26 #include "ui/base/ime/input_method.h"
27 #include "ui/base/ime/text_input_flags.h" 27 #include "ui/base/ime/text_input_flags.h"
28 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
29 #include "ui/base/theme_provider.h" 29 #include "ui/base/theme_provider.h"
30 #include "ui/events/event.h" 30 #include "ui/events/event.h"
31 #include "ui/gfx/color_palette.h" 31 #include "ui/gfx/color_palette.h"
32 #include "ui/gfx/paint_vector_icon.h" 32 #include "ui/gfx/paint_vector_icon.h"
33 #include "ui/gfx/vector_icons_public.h"
34 #include "ui/native_theme/native_theme.h" 33 #include "ui/native_theme/native_theme.h"
34 #include "ui/vector_icons/vector_icons.h"
35 #include "ui/views/background.h" 35 #include "ui/views/background.h"
36 #include "ui/views/border.h" 36 #include "ui/views/border.h"
37 #include "ui/views/bubble/bubble_border.h" 37 #include "ui/views/bubble/bubble_border.h"
38 #include "ui/views/controls/button/image_button.h" 38 #include "ui/views/controls/button/image_button.h"
39 #include "ui/views/controls/button/vector_icon_button.h" 39 #include "ui/views/controls/button/vector_icon_button.h"
40 #include "ui/views/controls/label.h" 40 #include "ui/views/controls/label.h"
41 #include "ui/views/controls/separator.h" 41 #include "ui/views/controls/separator.h"
42 #include "ui/views/layout/box_layout.h" 42 #include "ui/views/layout/box_layout.h"
43 #include "ui/views/painter.h" 43 #include "ui/views/painter.h"
44 #include "ui/views/view_targeter.h" 44 #include "ui/views/view_targeter.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 close_button_(new views::VectorIconButton(this)) { 122 close_button_(new views::VectorIconButton(this)) {
123 find_text_->set_id(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD); 123 find_text_->set_id(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
124 find_text_->set_default_width_in_chars(kDefaultCharWidth); 124 find_text_->set_default_width_in_chars(kDefaultCharWidth);
125 find_text_->set_controller(this); 125 find_text_->set_controller(this);
126 find_text_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FIND)); 126 find_text_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FIND));
127 find_text_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF); 127 find_text_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF);
128 AddChildView(find_text_); 128 AddChildView(find_text_);
129 129
130 find_previous_button_->SetIcon(kCaretUpIcon); 130 find_previous_button_->SetIcon(kCaretUpIcon);
131 find_next_button_->SetIcon(kCaretDownIcon); 131 find_next_button_->SetIcon(kCaretDownIcon);
132 close_button_->SetIcon(gfx::VectorIconId::BAR_CLOSE); 132 close_button_->SetIcon(ui::kCloseIcon);
133 133
134 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);
135 find_previous_button_->SetFocusForPlatform(); 135 find_previous_button_->SetFocusForPlatform();
136 find_previous_button_->SetTooltipText( 136 find_previous_button_->SetTooltipText(
137 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP)); 137 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP));
138 find_previous_button_->SetAccessibleName( 138 find_previous_button_->SetAccessibleName(
139 l10n_util::GetStringUTF16(IDS_ACCNAME_PREVIOUS)); 139 l10n_util::GetStringUTF16(IDS_ACCNAME_PREVIOUS));
140 AddChildView(find_previous_button_); 140 AddChildView(find_previous_button_);
141 141
142 find_next_button_->set_id(VIEW_ID_FIND_IN_PAGE_NEXT_BUTTON); 142 find_next_button_->set_id(VIEW_ID_FIND_IN_PAGE_NEXT_BUTTON);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 set_background(new views::BubbleBackground(border.get())); 417 set_background(new views::BubbleBackground(border.get()));
418 SetBorder(std::move(border)); 418 SetBorder(std::move(border));
419 419
420 match_count_text_->SetBackgroundColor(bg_color); 420 match_count_text_->SetBackgroundColor(bg_color);
421 SkColor text_color = 421 SkColor text_color =
422 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor); 422 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor);
423 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69)); 423 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69));
424 separator_->SetColor(SkColorSetA(text_color, 0x26)); 424 separator_->SetColor(SkColorSetA(text_color, 0x26));
425 } 425 }
426 426
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_shelf_view.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698