| 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/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" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 "https://groups.google.com/a/googleproductforums.com/d/topic/chrome/Xrco2HsX
S-8/discussion"; | 35 "https://groups.google.com/a/googleproductforums.com/d/topic/chrome/Xrco2HsX
S-8/discussion"; |
| 36 | 36 |
| 37 class InvertBubbleView : public views::BubbleDelegateView, | 37 class InvertBubbleView : public views::BubbleDelegateView, |
| 38 public views::LinkListener { | 38 public views::LinkListener { |
| 39 public: | 39 public: |
| 40 InvertBubbleView(Browser* browser, views::View* anchor_view); | 40 InvertBubbleView(Browser* browser, views::View* anchor_view); |
| 41 virtual ~InvertBubbleView(); | 41 virtual ~InvertBubbleView(); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // Overridden from views::BubbleDelegateView: | 44 // Overridden from views::BubbleDelegateView: |
| 45 virtual void Init() OVERRIDE; | 45 virtual void Init() override; |
| 46 | 46 |
| 47 // Overridden from views::LinkListener: | 47 // Overridden from views::LinkListener: |
| 48 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 48 virtual void LinkClicked(views::Link* source, int event_flags) override; |
| 49 | 49 |
| 50 void OpenLink(const std::string& url, int event_flags); | 50 void OpenLink(const std::string& url, int event_flags); |
| 51 | 51 |
| 52 Browser* browser_; | 52 Browser* browser_; |
| 53 views::Link* high_contrast_; | 53 views::Link* high_contrast_; |
| 54 views::Link* dark_theme_; | 54 views::Link* dark_theme_; |
| 55 views::Link* learn_more_; | 55 views::Link* learn_more_; |
| 56 views::Link* close_; | 56 views::Link* close_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(InvertBubbleView); | 58 DISALLOW_COPY_AND_ASSIGN(InvertBubbleView); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 views::View* anchor = browser_view->toolbar()->app_menu(); | 161 views::View* anchor = browser_view->toolbar()->app_menu(); |
| 162 if (gfx::IsInvertedColorScheme() && anchor && anchor->GetWidget() && | 162 if (gfx::IsInvertedColorScheme() && anchor && anchor->GetWidget() && |
| 163 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { | 163 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { |
| 164 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); | 164 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); |
| 165 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); | 165 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); |
| 166 views::BubbleDelegateView::CreateBubble(delegate)->Show(); | 166 views::BubbleDelegateView::CreateBubble(delegate)->Show(); |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace chrome | 170 } // namespace chrome |
| OLD | NEW |