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

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

Issue 8479042: UI polish for certificate viewer (Closed) Base URL: /usr/local/google/home/bshe/NoTouchChromium/../TouchChromium/src/@trunk
Patch Set: Edit comments. Created 9 years 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
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/dialog_style.h"
10 #include "chrome/browser/ui/views/window.h" 11 #include "chrome/browser/ui/views/window.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/message_box_flags.h" 14 #include "ui/base/message_box_flags.h"
14 #include "views/controls/message_box_view.h" 15 #include "views/controls/message_box_view.h"
15 #include "views/widget/widget.h" 16 #include "views/widget/widget.h"
16 17
17 #if defined(TOUCH_UI) || defined(USE_AURA) 18 #if defined(TOUCH_UI) || defined(USE_AURA)
18 #include "ui/views/focus/accelerator_handler.h" 19 #include "ui/views/focus/accelerator_handler.h"
19 #endif 20 #endif
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 SimpleMessageBoxViews::SimpleMessageBoxViews(gfx::NativeWindow parent_window, 137 SimpleMessageBoxViews::SimpleMessageBoxViews(gfx::NativeWindow parent_window,
137 int dialog_flags, 138 int dialog_flags,
138 const string16& title, 139 const string16& title,
139 const string16& message) 140 const string16& message)
140 : dialog_flags_(dialog_flags), 141 : dialog_flags_(dialog_flags),
141 disposition_(DISPOSITION_UNKNOWN) { 142 disposition_(DISPOSITION_UNKNOWN) {
142 message_box_title_ = title; 143 message_box_title_ = title;
143 message_box_view_ = new views::MessageBoxView(dialog_flags, 144 message_box_view_ = new views::MessageBoxView(dialog_flags,
144 message, 145 message,
145 string16()); 146 string16());
146 browser::CreateViewsWindow(parent_window, this)->Show(); 147 browser::CreateViewsWindow(parent_window, this, STYLE_GENERIC)->Show();
147 148
148 // Add reference to be released in DeleteDelegate(). 149 // Add reference to be released in DeleteDelegate().
149 AddRef(); 150 AddRef();
150 } 151 }
151 152
152 SimpleMessageBoxViews::~SimpleMessageBoxViews() { 153 SimpleMessageBoxViews::~SimpleMessageBoxViews() {
153 } 154 }
154 155
155 #if defined(OS_WIN) 156 #if defined(OS_WIN)
156 bool SimpleMessageBoxViews::Dispatch(const MSG& msg) { 157 bool SimpleMessageBoxViews::Dispatch(const MSG& msg) {
(...skipping 10 matching lines...) Expand all
167 if (disposition_ == DISPOSITION_UNKNOWN) 168 if (disposition_ == DISPOSITION_UNKNOWN)
168 return base::MessagePumpDispatcher::EVENT_PROCESSED; 169 return base::MessagePumpDispatcher::EVENT_PROCESSED;
169 return base::MessagePumpDispatcher::EVENT_QUIT; 170 return base::MessagePumpDispatcher::EVENT_QUIT;
170 } 171 }
171 #else 172 #else
172 bool SimpleMessageBoxViews::Dispatch(GdkEvent* event) { 173 bool SimpleMessageBoxViews::Dispatch(GdkEvent* event) {
173 gtk_main_do_event(event); 174 gtk_main_do_event(event);
174 return disposition_ == DISPOSITION_UNKNOWN; 175 return disposition_ == DISPOSITION_UNKNOWN;
175 } 176 }
176 #endif 177 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/js_modal_dialog_views.cc ('k') | chrome/browser/ui/views/update_recommended_message_box.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698