OLD | NEW |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 state->role = ui::AccessibilityTypes::ROLE_GROUPING; | 102 state->role = ui::AccessibilityTypes::ROLE_GROUPING; |
103 } | 103 } |
104 | 104 |
105 void BookmarkBarInstructionsView::LinkClicked(views::Link* source, | 105 void BookmarkBarInstructionsView::LinkClicked(views::Link* source, |
106 int event_flags) { | 106 int event_flags) { |
107 delegate_->ShowImportDialog(); | 107 delegate_->ShowImportDialog(); |
108 } | 108 } |
109 | 109 |
110 void BookmarkBarInstructionsView::ShowContextMenuForView( | 110 void BookmarkBarInstructionsView::ShowContextMenuForView( |
111 views::View* source, | 111 views::View* source, |
112 const gfx::Point& point) { | 112 const gfx::Point& point, |
| 113 ui::MenuSourceType source_type) { |
113 // Do nothing here, we don't want to show the Bookmarks context menu when | 114 // Do nothing here, we don't want to show the Bookmarks context menu when |
114 // the user right clicks on the "Import bookmarks now" link. | 115 // the user right clicks on the "Import bookmarks now" link. |
115 } | 116 } |
116 | 117 |
117 void BookmarkBarInstructionsView::UpdateColors() { | 118 void BookmarkBarInstructionsView::UpdateColors() { |
118 // We don't always have a theme provider (ui tests, for example). | 119 // We don't always have a theme provider (ui tests, for example). |
119 const ui::ThemeProvider* theme_provider = GetThemeProvider(); | 120 const ui::ThemeProvider* theme_provider = GetThemeProvider(); |
120 if (!theme_provider) | 121 if (!theme_provider) |
121 return; | 122 return; |
122 updated_colors_ = true; | 123 updated_colors_ = true; |
123 SkColor text_color = | 124 SkColor text_color = |
124 theme_provider->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT); | 125 theme_provider->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT); |
125 instructions_->SetEnabledColor(text_color); | 126 instructions_->SetEnabledColor(text_color); |
126 if (import_link_) | 127 if (import_link_) |
127 import_link_->SetEnabledColor(text_color); | 128 import_link_->SetEnabledColor(text_color); |
128 } | 129 } |
OLD | NEW |