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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 11421204: Use native theme colors for textfields; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase, add a blank line between includes. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.h ('k') | ui/gfx/sys_color_change_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index bda1e48da0c8e4ddd594b08a7ef90de6b80b935c..7fbabe331fc705e745bba0b3ef21e415f0c47e1c 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -194,12 +194,6 @@ class OmniboxViewViews::AutocompleteTextfield : public views::Textfield {
omnibox_view_->HandleMouseReleaseEvent(event);
}
- protected:
- // views::View implementation.
- virtual void PaintChildren(gfx::Canvas* canvas) {
- views::Textfield::PaintChildren(canvas);
- }
-
private:
OmniboxViewViews* omnibox_view_;
LocationBarView* location_bar_view_;
@@ -224,8 +218,7 @@ OmniboxViewViews::OmniboxViewViews(OmniboxEditController* controller,
delete_at_end_pressed_(false),
location_bar_view_(location_bar),
ime_candidate_window_open_(false),
- select_all_on_mouse_release_(false),
- visible_caret_color_(SK_ColorBLACK) {
+ select_all_on_mouse_release_(false) {
}
OmniboxViewViews::~OmniboxViewViews() {
@@ -590,12 +583,7 @@ void OmniboxViewViews::SetFocus() {
}
void OmniboxViewViews::ApplyCaretVisibility() {
- if (textfield_->cursor_color() != textfield_->background_color())
- visible_caret_color_ = textfield_->cursor_color();
- // Setting the color of the text cursor (caret) to the background color
- // effectively hides it.
- textfield_->SetCursorColor(model()->is_caret_visible() ?
- visible_caret_color_ : textfield_->background_color());
+ textfield_->SetCursorEnabled(model()->is_caret_visible());
}
void OmniboxViewViews::OnTemporaryTextMaybeChanged(
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.h ('k') | ui/gfx/sys_color_change_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698