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

Side by Side Diff: chrome/browser/ui/views/accessibility/invert_bubble_view.cc

Issue 1219533009: Make SysColorChangeListener Windows-only instead of having an empty shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@net_private_fields
Patch Set: rebase Created 5 years, 5 months 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 unified diff | Download patch
OLDNEW
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/prefs/pref_service.h" 7 #include "base/prefs/pref_service.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"
11 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" 11 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
12 #include "chrome/browser/ui/views/toolbar/wrench_toolbar_button.h" 12 #include "chrome/browser/ui/views/toolbar/wrench_toolbar_button.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
15 #include "content/public/browser/page_navigator.h" 15 #include "content/public/browser/page_navigator.h"
16 #include "grit/components_strings.h" 16 #include "grit/components_strings.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
19 #include "ui/base/window_open_disposition.h" 19 #include "ui/base/window_open_disposition.h"
20 #include "ui/gfx/sys_color_change_listener.h" 20 #include "ui/gfx/color_utils.h"
21 #include "ui/views/bubble/bubble_delegate.h" 21 #include "ui/views/bubble/bubble_delegate.h"
22 #include "ui/views/controls/label.h" 22 #include "ui/views/controls/label.h"
23 #include "ui/views/controls/link.h" 23 #include "ui/views/controls/link.h"
24 #include "ui/views/controls/link_listener.h" 24 #include "ui/views/controls/link_listener.h"
25 #include "ui/views/layout/grid_layout.h" 25 #include "ui/views/layout/grid_layout.h"
26 #include "ui/views/layout/layout_constants.h" 26 #include "ui/views/layout/layout_constants.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 28
29 namespace { 29 namespace {
30 30
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 } // namespace 155 } // namespace
156 156
157 namespace chrome { 157 namespace chrome {
158 158
159 void MaybeShowInvertBubbleView(BrowserView* browser_view) { 159 void MaybeShowInvertBubbleView(BrowserView* browser_view) {
160 Browser* browser = browser_view->browser(); 160 Browser* browser = browser_view->browser();
161 PrefService* pref_service = browser->profile()->GetPrefs(); 161 PrefService* pref_service = browser->profile()->GetPrefs();
162 views::View* anchor = browser_view->toolbar()->app_menu(); 162 views::View* anchor = browser_view->toolbar()->app_menu();
163 if (gfx::IsInvertedColorScheme() && anchor && anchor->GetWidget() && 163 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() &&
164 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { 164 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) {
165 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); 165 pref_service->SetBoolean(prefs::kInvertNotificationShown, true);
166 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); 166 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor);
167 views::BubbleDelegateView::CreateBubble(delegate)->Show(); 167 views::BubbleDelegateView::CreateBubble(delegate)->Show();
168 } 168 }
169 } 169 }
170 170
171 } // namespace chrome 171 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698