| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 dark_theme_ = new views::Link(l10n_util::GetStringUTF16(IDS_DARK_THEME)); | 100 dark_theme_ = new views::Link(l10n_util::GetStringUTF16(IDS_DARK_THEME)); |
| 101 dark_theme_->SetFontList(original_font_list); | 101 dark_theme_->SetFontList(original_font_list); |
| 102 dark_theme_->set_listener(this); | 102 dark_theme_->set_listener(this); |
| 103 | 103 |
| 104 close_ = new views::Link(l10n_util::GetStringUTF16(IDS_CLOSE)); | 104 close_ = new views::Link(l10n_util::GetStringUTF16(IDS_CLOSE)); |
| 105 close_->SetFontList(original_font_list); | 105 close_->SetFontList(original_font_list); |
| 106 close_->set_listener(this); | 106 close_->set_listener(this); |
| 107 | 107 |
| 108 views::GridLayout* layout = views::GridLayout::CreatePanel(this); | 108 views::GridLayout* layout = views::GridLayout::CreatePanel(this); |
| 109 SetLayoutManager(layout); | |
| 110 | 109 |
| 111 views::ColumnSet* columns = layout->AddColumnSet(0); | 110 views::ColumnSet* columns = layout->AddColumnSet(0); |
| 112 for (int i = 0; i < 4; i++) { | 111 for (int i = 0; i < 4; i++) { |
| 113 columns->AddColumn(views::GridLayout::LEADING, | 112 columns->AddColumn(views::GridLayout::LEADING, |
| 114 views::GridLayout::LEADING, 0, | 113 views::GridLayout::LEADING, 0, |
| 115 views::GridLayout::USE_PREF, 0, 0); | 114 views::GridLayout::USE_PREF, 0, 0); |
| 116 } | 115 } |
| 117 | 116 |
| 118 layout->StartRow(0, 0); | 117 layout->StartRow(0, 0); |
| 119 layout->AddView(title, 4, 1); | 118 layout->AddView(title, 4, 1); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 views::View* anchor = browser_view->toolbar()->app_menu_button(); | 171 views::View* anchor = browser_view->toolbar()->app_menu_button(); |
| 173 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && | 172 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && |
| 174 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { | 173 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { |
| 175 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); | 174 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); |
| 176 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); | 175 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); |
| 177 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show(); | 176 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show(); |
| 178 } | 177 } |
| 179 } | 178 } |
| 180 | 179 |
| 181 } // namespace chrome | 180 } // namespace chrome |
| OLD | NEW |