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

Side by Side Diff: chrome/browser/app_modal_dialog_gtk.cc

Issue 100061: Revert r14620 which was a rollback of r14549 and r14508. This (Closed)
Patch Set: rebase Created 11 years, 7 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
« no previous file with comments | « base/process_util_posix.cc ('k') | chrome/browser/unload_uitest.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/app_modal_dialog.h" 5 #include "chrome/browser/app_modal_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void AppModalDialog::ActivateModalDialog() { 101 void AppModalDialog::ActivateModalDialog() {
102 NOTIMPLEMENTED(); 102 NOTIMPLEMENTED();
103 } 103 }
104 104
105 void AppModalDialog::CloseModalDialog() { 105 void AppModalDialog::CloseModalDialog() {
106 NOTIMPLEMENTED(); 106 NOTIMPLEMENTED();
107 } 107 }
108 108
109 int AppModalDialog::GetDialogButtons() { 109 int AppModalDialog::GetDialogButtons() {
110 NOTIMPLEMENTED(); 110 switch (dialog_flags_) {
111 return 0; 111 case MessageBoxFlags::kIsJavascriptAlert:
112 return MessageBoxFlags::DIALOGBUTTON_OK;
113
114 case MessageBoxFlags::kIsJavascriptConfirm:
115 return MessageBoxFlags::DIALOGBUTTON_OK |
116 MessageBoxFlags::DIALOGBUTTON_CANCEL;
117
118 case MessageBoxFlags::kIsJavascriptPrompt:
119 return MessageBoxFlags::DIALOGBUTTON_OK;
120
121 default:
122 NOTREACHED();
123 return 0;
124 }
112 } 125 }
113 126
114 void AppModalDialog::AcceptWindow() { 127 void AppModalDialog::AcceptWindow() {
115 NOTIMPLEMENTED(); 128 OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_OK, this);
116 } 129 }
117 130
118 void AppModalDialog::CancelWindow() { 131 void AppModalDialog::CancelWindow() {
119 NOTIMPLEMENTED(); 132 OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_CANCEL, this);
120 } 133 }
OLDNEW
« no previous file with comments | « base/process_util_posix.cc ('k') | chrome/browser/unload_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698