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

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

Issue 8771006: views: Move the remaining file from views/ to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/themes/theme_service.h" 13 #include "chrome/browser/themes/theme_service.h"
14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 14 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
15 #include "chrome/browser/ui/find_bar/find_bar_state.h" 15 #include "chrome/browser/ui/find_bar/find_bar_state.h"
16 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 16 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
18 #include "chrome/browser/ui/view_ids.h" 18 #include "chrome/browser/ui/view_ids.h"
19 #include "chrome/browser/ui/views/find_bar_host.h" 19 #include "chrome/browser/ui/views/find_bar_host.h"
20 #include "chrome/browser/ui/views/frame/browser_view.h" 20 #include "chrome/browser/ui/views/frame/browser_view.h"
21 #include "content/browser/tab_contents/tab_contents.h" 21 #include "content/browser/tab_contents/tab_contents.h"
22 #include "grit/generated_resources.h" 22 #include "grit/generated_resources.h"
23 #include "grit/theme_resources.h" 23 #include "grit/theme_resources.h"
24 #include "grit/theme_resources_standard.h" 24 #include "grit/theme_resources_standard.h"
25 #include "third_party/skia/include/effects/SkGradientShader.h" 25 #include "third_party/skia/include/effects/SkGradientShader.h"
26 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
27 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
28 #include "ui/gfx/canvas.h" 28 #include "ui/gfx/canvas.h"
29 #include "ui/views/background.h"
29 #include "ui/views/controls/button/image_button.h" 30 #include "ui/views/controls/button/image_button.h"
30 #include "ui/views/controls/label.h" 31 #include "ui/views/controls/label.h"
31 #include "ui/views/controls/textfield/textfield.h" 32 #include "ui/views/controls/textfield/textfield.h"
32 #include "ui/views/widget/widget.h" 33 #include "ui/views/widget/widget.h"
33 #include "views/background.h"
34 34
35 // The amount of whitespace to have before the find button. 35 // The amount of whitespace to have before the find button.
36 static const int kWhiteSpaceAfterMatchCountLabel = 1; 36 static const int kWhiteSpaceAfterMatchCountLabel = 1;
37 37
38 // The margins around the search field and the close button. 38 // The margins around the search field and the close button.
39 static const int kMarginLeftOfCloseButton = 3; 39 static const int kMarginLeftOfCloseButton = 3;
40 static const int kMarginRightOfCloseButton = 7; 40 static const int kMarginRightOfCloseButton = 7;
41 static const int kMarginLeftOfFindTextfield = 12; 41 static const int kMarginLeftOfFindTextfield = 12;
42 42
43 // The margins around the match count label (We add extra space so that the 43 // The margins around the match count label (We add extra space so that the
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 489
490 void FindBarView::OnThemeChanged() { 490 void FindBarView::OnThemeChanged() {
491 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 491 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
492 if (GetThemeProvider()) { 492 if (GetThemeProvider()) {
493 close_button_->SetBackground( 493 close_button_->SetBackground(
494 GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT), 494 GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT),
495 rb.GetBitmapNamed(IDR_CLOSE_BAR), 495 rb.GetBitmapNamed(IDR_CLOSE_BAR),
496 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); 496 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK));
497 } 497 }
498 } 498 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_host_interactive_uitest.cc ('k') | chrome/browser/ui/views/first_run_search_engine_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698