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

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

Issue 8632001: Removed TOUCH_UI (mostly constants) from chrome/browser/ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/simple_message_box_views.h" 5 #include "chrome/browser/ui/views/simple_message_box_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/simple_message_box.h" 9 #include "chrome/browser/simple_message_box.h"
10 #include "chrome/browser/ui/views/window.h" 10 #include "chrome/browser/ui/views/window.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/message_box_flags.h" 13 #include "ui/base/message_box_flags.h"
14 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 #include "views/controls/message_box_view.h" 15 #include "views/controls/message_box_view.h"
16 16
17 #if defined(TOUCH_UI) || defined(USE_AURA) 17 #if defined(USE_AURA)
18 #include "ui/views/focus/accelerator_handler.h" 18 #include "ui/views/focus/accelerator_handler.h"
19 #endif 19 #endif
20 20
21 namespace browser { 21 namespace browser {
22 22
23 void ShowErrorBox(gfx::NativeWindow parent, 23 void ShowErrorBox(gfx::NativeWindow parent,
24 const string16& title, 24 const string16& title,
25 const string16& message) { 25 const string16& message) {
26 SimpleMessageBoxViews::ShowErrorBox(parent, title, message); 26 SimpleMessageBoxViews::ShowErrorBox(parent, title, message);
27 } 27 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 SimpleMessageBoxViews::~SimpleMessageBoxViews() { 152 SimpleMessageBoxViews::~SimpleMessageBoxViews() {
153 } 153 }
154 154
155 #if defined(OS_WIN) 155 #if defined(OS_WIN)
156 bool SimpleMessageBoxViews::Dispatch(const MSG& msg) { 156 bool SimpleMessageBoxViews::Dispatch(const MSG& msg) {
157 TranslateMessage(&msg); 157 TranslateMessage(&msg);
158 DispatchMessage(&msg); 158 DispatchMessage(&msg);
159 return disposition_ == DISPOSITION_UNKNOWN; 159 return disposition_ == DISPOSITION_UNKNOWN;
160 } 160 }
161 #elif defined(TOUCH_UI) || defined(USE_AURA) 161 #elif defined(USE_AURA)
162 base::MessagePumpDispatcher::DispatchStatus 162 base::MessagePumpDispatcher::DispatchStatus
163 SimpleMessageBoxViews::Dispatch(XEvent* xev) { 163 SimpleMessageBoxViews::Dispatch(XEvent* xev) {
164 if (!views::DispatchXEvent(xev)) 164 if (!views::DispatchXEvent(xev))
165 return EVENT_IGNORED; 165 return EVENT_IGNORED;
166 166
167 if (disposition_ == DISPOSITION_UNKNOWN) 167 if (disposition_ == DISPOSITION_UNKNOWN)
168 return base::MessagePumpDispatcher::EVENT_PROCESSED; 168 return base::MessagePumpDispatcher::EVENT_PROCESSED;
169 return base::MessagePumpDispatcher::EVENT_QUIT; 169 return base::MessagePumpDispatcher::EVENT_QUIT;
170 } 170 }
171 #else 171 #else
172 bool SimpleMessageBoxViews::Dispatch(GdkEvent* event) { 172 bool SimpleMessageBoxViews::Dispatch(GdkEvent* event) {
173 gtk_main_do_event(event); 173 gtk_main_do_event(event);
174 return disposition_ == DISPOSITION_UNKNOWN; 174 return disposition_ == DISPOSITION_UNKNOWN;
175 } 175 }
176 #endif 176 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698