| 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 "chrome/browser/event_disposition.h" | 7 #include "chrome/browser/event_disposition.h" |
| 8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 chrome::DispositionFromEventFlags(event_flags); | 148 chrome::DispositionFromEventFlags(event_flags); |
| 149 content::OpenURLParams params( | 149 content::OpenURLParams params( |
| 150 GURL(url), content::Referrer(), | 150 GURL(url), content::Referrer(), |
| 151 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, | 151 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, |
| 152 content::PAGE_TRANSITION_LINK, false); | 152 content::PAGE_TRANSITION_LINK, false); |
| 153 browser_->OpenURL(params); | 153 browser_->OpenURL(params); |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace | 156 } // namespace |
| 157 | 157 |
| 158 namespace browser { | 158 namespace chrome { |
| 159 | 159 |
| 160 void MaybeShowInvertBubbleView(Browser* browser, views::View* anchor_view) { | 160 void MaybeShowInvertBubbleView(Browser* browser, views::View* anchor_view) { |
| 161 PrefService* pref_service = browser->profile()->GetPrefs(); | 161 PrefService* pref_service = browser->profile()->GetPrefs(); |
| 162 if (gfx::IsInvertedColorScheme() && | 162 if (gfx::IsInvertedColorScheme() && |
| 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_view); | 165 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor_view); |
| 166 views::BubbleDelegateView::CreateBubble(delegate); | 166 views::BubbleDelegateView::CreateBubble(delegate); |
| 167 delegate->StartFade(true); | 167 delegate->StartFade(true); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace browser | 171 } // namespace chrome |
| OLD | NEW |