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/accessibility/invert_bubble_view.h" | 5 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 int InvertBubbleView::GetDialogButtons() const { | 76 int InvertBubbleView::GetDialogButtons() const { |
77 return ui::DIALOG_BUTTON_NONE; | 77 return ui::DIALOG_BUTTON_NONE; |
78 } | 78 } |
79 | 79 |
80 void InvertBubbleView::Init() { | 80 void InvertBubbleView::Init() { |
81 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 81 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
82 const gfx::FontList& original_font_list = | 82 const gfx::FontList& original_font_list = |
83 rb.GetFontList(ui::ResourceBundle::MediumFont); | 83 rb.GetFontList(ui::ResourceBundle::MediumFont); |
84 | 84 |
| 85 // TODO(tapted): This should be using WidgetDelegate::GetWindowTitle(). |
85 views::Label* title = new views::Label( | 86 views::Label* title = new views::Label( |
86 base::string16(), | 87 base::string16(), {original_font_list.Derive(2, gfx::Font::NORMAL, |
87 original_font_list.Derive(2, gfx::Font::NORMAL, gfx::Font::Weight::BOLD)); | 88 gfx::Font::Weight::BOLD)}); |
88 title->SetMultiLine(true); | 89 title->SetMultiLine(true); |
89 | 90 |
90 learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_LEARN_MORE)); | 91 learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_LEARN_MORE)); |
91 learn_more_->SetFontList(original_font_list); | 92 learn_more_->SetFontList(original_font_list); |
92 learn_more_->set_listener(this); | 93 learn_more_->set_listener(this); |
93 | 94 |
94 high_contrast_ = | 95 high_contrast_ = |
95 new views::Link(l10n_util::GetStringUTF16(IDS_HIGH_CONTRAST_EXT)); | 96 new views::Link(l10n_util::GetStringUTF16(IDS_HIGH_CONTRAST_EXT)); |
96 high_contrast_->SetFontList(original_font_list); | 97 high_contrast_->SetFontList(original_font_list); |
97 high_contrast_->set_listener(this); | 98 high_contrast_->set_listener(this); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 views::View* anchor = browser_view->toolbar()->app_menu_button(); | 172 views::View* anchor = browser_view->toolbar()->app_menu_button(); |
172 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && | 173 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && |
173 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { | 174 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { |
174 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); | 175 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); |
175 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); | 176 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); |
176 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show(); | 177 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show(); |
177 } | 178 } |
178 } | 179 } |
179 | 180 |
180 } // namespace chrome | 181 } // namespace chrome |
OLD | NEW |