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

Side by Side Diff: chrome/browser/ui/views/simple_message_box_views.cc

Issue 136643006: Clean up some ifdefs around Win Aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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/simple_message_box.h" 5 #include "chrome/browser/ui/simple_message_box.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 SimpleMessageBoxViews::~SimpleMessageBoxViews() { 190 SimpleMessageBoxViews::~SimpleMessageBoxViews() {
191 } 191 }
192 192
193 MessageBoxResult ShowMessageBoxImpl(gfx::NativeWindow parent, 193 MessageBoxResult ShowMessageBoxImpl(gfx::NativeWindow parent,
194 const base::string16& title, 194 const base::string16& title,
195 const base::string16& message, 195 const base::string16& message,
196 MessageBoxType type, 196 MessageBoxType type,
197 const base::string16& yes_text, 197 const base::string16& yes_text,
198 const base::string16& no_text) { 198 const base::string16& no_text) {
199 199
200 #if defined(USE_AURA) && defined(OS_WIN) 200 #if defined(OS_WIN)
201 // If we're very early, we can't show a GPU-based dialog, so fallback to 201 // If we're very early, we can't show a GPU-based dialog, so fallback to
202 // plain Windows MessageBox. 202 // plain Windows MessageBox.
203 if (!ui::ContextFactory::GetInstance()) 203 if (!ui::ContextFactory::GetInstance())
204 return NativeShowMessageBox(NULL, title, message, type); 204 return NativeShowMessageBox(NULL, title, message, type);
205 #endif 205 #endif
206 206
207 scoped_refptr<SimpleMessageBoxViews> dialog( 207 scoped_refptr<SimpleMessageBoxViews> dialog(
208 new SimpleMessageBoxViews(title, message, type, yes_text, no_text)); 208 new SimpleMessageBoxViews(title, message, type, yes_text, no_text));
209 CreateBrowserModalDialogViews(dialog.get(), parent)->Show(); 209 CreateBrowserModalDialogViews(dialog.get(), parent)->Show();
210 210
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 const base::string16& title, 246 const base::string16& title,
247 const base::string16& message, 247 const base::string16& message,
248 const base::string16& yes_text, 248 const base::string16& yes_text,
249 const base::string16& no_text) { 249 const base::string16& no_text) {
250 return ShowMessageBoxImpl( 250 return ShowMessageBoxImpl(
251 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text); 251 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text);
252 } 252 }
253 #endif 253 #endif
254 254
255 } // namespace chrome 255 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view_browsertest.cc ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698