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

Side by Side Diff: chrome/browser/ui/gtk/html_dialog_gtk.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, 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
« no previous file with comments | « chrome/browser/ui/dialog_style.h ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gtk/html_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/html_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_dialogs.h" 12 #include "chrome/browser/ui/browser_dialogs.h"
13 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
14 #include "chrome/browser/ui/gtk/gtk_util.h" 14 #include "chrome/browser/ui/gtk/gtk_util.h"
15 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" 15 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
17 #include "chrome/browser/ui/webui/html_dialog_ui.h" 17 #include "chrome/browser/ui/webui/html_dialog_ui.h"
18 #include "content/browser/tab_contents/tab_contents.h" 18 #include "content/browser/tab_contents/tab_contents.h"
19 #include "content/public/browser/native_web_keyboard_event.h" 19 #include "content/public/browser/native_web_keyboard_event.h"
20 20
21 namespace browser { 21 namespace browser {
22 22
23 gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile, 23 gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile,
24 HtmlDialogUIDelegate* delegate) { 24 HtmlDialogUIDelegate* delegate,
25 DialogStyle style) {
25 // It's not always safe to display an html dialog with an off the record 26 // It's not always safe to display an html dialog with an off the record
26 // profile. If the last browser with that profile is closed it will go 27 // profile. If the last browser with that profile is closed it will go
27 // away. 28 // away.
29 // Ignore style for now. The style parameter only used in the implementation
30 // in html_dialog_view.cc file.
31 // TODO (bshe): Add style parameter to HtmlDialogGtk.
28 DCHECK(!profile->IsOffTheRecord() || delegate->IsDialogModal()); 32 DCHECK(!profile->IsOffTheRecord() || delegate->IsDialogModal());
29 HtmlDialogGtk* html_dialog = 33 HtmlDialogGtk* html_dialog =
30 new HtmlDialogGtk(profile, delegate, parent); 34 new HtmlDialogGtk(profile, delegate, parent);
31 return html_dialog->InitDialog(); 35 return html_dialog->InitDialog();
32 } 36 }
33 37
34 } // namespace browser 38 } // namespace browser
35 39
36 namespace { 40 namespace {
37 41
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 dialog_size.height()); 204 dialog_size.height());
201 205
202 gtk_widget_show_all(dialog_); 206 gtk_widget_show_all(dialog_);
203 207
204 return GTK_WINDOW(dialog_); 208 return GTK_WINDOW(dialog_);
205 } 209 }
206 210
207 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 211 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
208 OnDialogClosed(std::string()); 212 OnDialogClosed(std::string());
209 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/dialog_style.h ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698