| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 InvertBubbleView::~InvertBubbleView() { | 72 InvertBubbleView::~InvertBubbleView() { |
| 73 } | 73 } |
| 74 | 74 |
| 75 void InvertBubbleView::Init() { | 75 void InvertBubbleView::Init() { |
| 76 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 76 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 77 const gfx::FontList& original_font_list = | 77 const gfx::FontList& original_font_list = |
| 78 rb.GetFontList(ui::ResourceBundle::MediumFont); | 78 rb.GetFontList(ui::ResourceBundle::MediumFont); |
| 79 | 79 |
| 80 views::Label* title = new views::Label( | 80 views::Label* title = new views::Label( |
| 81 base::string16(), original_font_list.Derive(2, gfx::Font::BOLD)); | 81 base::string16(), |
| 82 original_font_list.Derive(2, gfx::Font::NORMAL, gfx::Font::Weight::BOLD)); |
| 82 title->SetMultiLine(true); | 83 title->SetMultiLine(true); |
| 83 | 84 |
| 84 learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_LEARN_MORE)); | 85 learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_LEARN_MORE)); |
| 85 learn_more_->SetFontList(original_font_list); | 86 learn_more_->SetFontList(original_font_list); |
| 86 learn_more_->set_listener(this); | 87 learn_more_->set_listener(this); |
| 87 | 88 |
| 88 high_contrast_ = | 89 high_contrast_ = |
| 89 new views::Link(l10n_util::GetStringUTF16(IDS_HIGH_CONTRAST_EXT)); | 90 new views::Link(l10n_util::GetStringUTF16(IDS_HIGH_CONTRAST_EXT)); |
| 90 high_contrast_->SetFontList(original_font_list); | 91 high_contrast_->SetFontList(original_font_list); |
| 91 high_contrast_->set_listener(this); | 92 high_contrast_->set_listener(this); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 views::View* anchor = browser_view->toolbar()->app_menu_button(); | 164 views::View* anchor = browser_view->toolbar()->app_menu_button(); |
| 164 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && | 165 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && |
| 165 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { | 166 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { |
| 166 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); | 167 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); |
| 167 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); | 168 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); |
| 168 views::BubbleDelegateView::CreateBubble(delegate)->Show(); | 169 views::BubbleDelegateView::CreateBubble(delegate)->Show(); |
| 169 } | 170 } |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace chrome | 173 } // namespace chrome |
| OLD | NEW |