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

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

Issue 869453002: Define class names for views class in c/b/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: addressed comments 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 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/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 prefsize.Enlarge(kMarginLeftOfCloseButton + kMarginRightOfCloseButton + 352 prefsize.Enlarge(kMarginLeftOfCloseButton + kMarginRightOfCloseButton +
353 kMarginLeftOfFindTextfield - 353 kMarginLeftOfFindTextfield -
354 find_text_->GetInsets().width(), 354 find_text_->GetInsets().width(),
355 0); 355 0);
356 prefsize.Enlarge(find_previous_button_->GetPreferredSize().width(), 0); 356 prefsize.Enlarge(find_previous_button_->GetPreferredSize().width(), 0);
357 prefsize.Enlarge(find_next_button_->GetPreferredSize().width(), 0); 357 prefsize.Enlarge(find_next_button_->GetPreferredSize().width(), 0);
358 prefsize.Enlarge(close_button_->GetPreferredSize().width(), 0); 358 prefsize.Enlarge(close_button_->GetPreferredSize().width(), 0);
359 return prefsize; 359 return prefsize;
360 } 360 }
361 361
362 const char* FindBarView::GetClassName() const {
363 return "FindBarView";
364 }
365
362 //////////////////////////////////////////////////////////////////////////////// 366 ////////////////////////////////////////////////////////////////////////////////
363 // FindBarView, views::ButtonListener implementation: 367 // FindBarView, views::ButtonListener implementation:
364 368
365 void FindBarView::ButtonPressed( 369 void FindBarView::ButtonPressed(
366 views::Button* sender, const ui::Event& event) { 370 views::Button* sender, const ui::Event& event) {
367 switch (sender->tag()) { 371 switch (sender->tag()) {
368 case FIND_PREVIOUS_TAG: 372 case FIND_PREVIOUS_TAG:
369 case FIND_NEXT_TAG: 373 case FIND_NEXT_TAG:
370 if (!find_text_->text().empty()) { 374 if (!find_text_->text().empty()) {
371 FindTabHelper* find_tab_helper = FindTabHelper::FromWebContents( 375 FindTabHelper* find_tab_helper = FindTabHelper::FromWebContents(
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 501
498 void FindBarView::OnThemeChanged() { 502 void FindBarView::OnThemeChanged() {
499 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 503 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
500 if (GetThemeProvider()) { 504 if (GetThemeProvider()) {
501 close_button_->SetBackground( 505 close_button_->SetBackground(
502 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TAB_TEXT), 506 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TAB_TEXT),
503 rb.GetImageSkiaNamed(IDR_CLOSE_1), 507 rb.GetImageSkiaNamed(IDR_CLOSE_1),
504 rb.GetImageSkiaNamed(IDR_CLOSE_1_MASK)); 508 rb.GetImageSkiaNamed(IDR_CLOSE_1_MASK));
505 } 509 }
506 } 510 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698