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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_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/bookmarks/bookmark_bar_instructions_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/defaults.h" 10 #include "chrome/browser/defaults.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 y = baseline_ - baseline; 80 y = baseline_ - baseline;
81 else 81 else
82 y = (height() - pref.height()) / 2; 82 y = (height() - pref.height()) / 2;
83 int view_width = std::min(remaining_width, pref.width()); 83 int view_width = std::min(remaining_width, pref.width());
84 view->SetBounds(x, y, view_width, pref.height()); 84 view->SetBounds(x, y, view_width, pref.height());
85 x += view_width + kViewPadding; 85 x += view_width + kViewPadding;
86 remaining_width = std::max(0, width() - x); 86 remaining_width = std::max(0, width() - x);
87 } 87 }
88 } 88 }
89 89
90 const char* BookmarkBarInstructionsView::GetClassName() const {
91 return "BookmarkBarInstructionsView";
92 }
93
90 void BookmarkBarInstructionsView::OnThemeChanged() { 94 void BookmarkBarInstructionsView::OnThemeChanged() {
91 UpdateColors(); 95 UpdateColors();
92 } 96 }
93 97
94 void BookmarkBarInstructionsView::ViewHierarchyChanged( 98 void BookmarkBarInstructionsView::ViewHierarchyChanged(
95 const ViewHierarchyChangedDetails& details) { 99 const ViewHierarchyChangedDetails& details) {
96 if (!updated_colors_ && details.is_add && GetWidget()) 100 if (!updated_colors_ && details.is_add && GetWidget())
97 UpdateColors(); 101 UpdateColors();
98 } 102 }
99 103
(...skipping 20 matching lines...) Expand all
120 const ui::ThemeProvider* theme_provider = GetThemeProvider(); 124 const ui::ThemeProvider* theme_provider = GetThemeProvider();
121 if (!theme_provider) 125 if (!theme_provider)
122 return; 126 return;
123 updated_colors_ = true; 127 updated_colors_ = true;
124 SkColor text_color = 128 SkColor text_color =
125 theme_provider->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT); 129 theme_provider->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT);
126 instructions_->SetEnabledColor(text_color); 130 instructions_->SetEnabledColor(text_color);
127 if (import_link_) 131 if (import_link_)
128 import_link_->SetEnabledColor(text_color); 132 import_link_->SetEnabledColor(text_color);
129 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698