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

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

Issue 10694060: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 "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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 else if (source == learn_more_) 137 else if (source == learn_more_)
138 OpenLink(kLearnMoreUrl, event_flags); 138 OpenLink(kLearnMoreUrl, event_flags);
139 else if (source == close_) 139 else if (source == close_)
140 GetWidget()->Close(); 140 GetWidget()->Close();
141 else 141 else
142 NOTREACHED(); 142 NOTREACHED();
143 } 143 }
144 144
145 void InvertBubbleView::OpenLink(const std::string& url, int event_flags) { 145 void InvertBubbleView::OpenLink(const std::string& url, int event_flags) {
146 WindowOpenDisposition disposition = 146 WindowOpenDisposition disposition =
147 browser::DispositionFromEventFlags(event_flags); 147 chrome::DispositionFromEventFlags(event_flags);
148 content::OpenURLParams params( 148 content::OpenURLParams params(
149 GURL(url), content::Referrer(), 149 GURL(url), content::Referrer(),
150 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, 150 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition,
151 content::PAGE_TRANSITION_LINK, false); 151 content::PAGE_TRANSITION_LINK, false);
152 browser_->OpenURL(params); 152 browser_->OpenURL(params);
153 } 153 }
154 154
155 } // namespace 155 } // namespace
156 156
157 namespace browser { 157 namespace browser {
158 158
159 void MaybeShowInvertBubbleView(Browser* browser, views::View* anchor_view) { 159 void MaybeShowInvertBubbleView(Browser* browser, views::View* anchor_view) {
160 PrefService* pref_service = browser->profile()->GetPrefs(); 160 PrefService* pref_service = browser->profile()->GetPrefs();
161 if (gfx::IsInvertedColorScheme() && 161 if (gfx::IsInvertedColorScheme() &&
162 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { 162 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) {
163 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); 163 pref_service->SetBoolean(prefs::kInvertNotificationShown, true);
164 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor_view); 164 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor_view);
165 views::BubbleDelegateView::CreateBubble(delegate); 165 views::BubbleDelegateView::CreateBubble(delegate);
166 delegate->StartFade(true); 166 delegate->StartFade(true);
167 } 167 }
168 } 168 }
169 169
170 } // namespace browser 170 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/back_forward_menu_model.cc ('k') | chrome/browser/ui/views/ash/app_list/search_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698