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

Side by Side Diff: chrome/browser/gtk/js_modal_dialog_gtk.h

Issue 5999008: gtk: Cleanup JSModalDialogGtk implementation. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/gtk/js_modal_dialog_gtk.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_GTK_JS_MODAL_DIALOG_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_JS_MODAL_DIALOG_GTK_H_
6 #define CHROME_BROWSER_GTK_JS_MODAL_DIALOG_GTK_H_ 6 #define CHROME_BROWSER_GTK_JS_MODAL_DIALOG_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h>
10
11 #include "app/gtk_signal.h" 9 #include "app/gtk_signal.h"
12 #include "base/logging.h" 10 #include "base/basictypes.h"
13 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
14 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" 12 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
15 #include "gfx/native_widget_types.h" 13 #include "gfx/native_widget_types.h"
16 14
15 typedef struct _GtkWidget GtkWidget;
16
17 class JavaScriptAppModalDialog; 17 class JavaScriptAppModalDialog;
18 18
19 class JSModalDialogGtk : public NativeAppModalDialog { 19 class JSModalDialogGtk : public NativeAppModalDialog {
20 public: 20 public:
21 JSModalDialogGtk(JavaScriptAppModalDialog* dialog, 21 JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
22 gfx::NativeWindow parent_window); 22 gfx::NativeWindow parent_window);
23 virtual ~JSModalDialogGtk(); 23 virtual ~JSModalDialogGtk();
24 24
25 // Overridden from NativeAppModalDialog: 25 // Overridden from NativeAppModalDialog:
26 virtual int GetAppModalDialogButtons() const; 26 virtual int GetAppModalDialogButtons() const;
27 virtual void ShowAppModalDialog(); 27 virtual void ShowAppModalDialog();
28 virtual void ActivateAppModalDialog(); 28 virtual void ActivateAppModalDialog();
29 virtual void CloseAppModalDialog(); 29 virtual void CloseAppModalDialog();
30 virtual void AcceptAppModalDialog(); 30 virtual void AcceptAppModalDialog();
31 virtual void CancelAppModalDialog(); 31 virtual void CancelAppModalDialog();
32 32
33 private: 33 private:
34 void HandleDialogResponse(GtkDialog* dialog, gint response_id); 34 CHROMEGTK_CALLBACK_1(JSModalDialogGtk, void, OnDialogResponse, int);
35 static void OnDialogResponse(GtkDialog* gtk_dialog, gint response_id,
36 JSModalDialogGtk* dialog);
37 35
38 scoped_ptr<JavaScriptAppModalDialog> dialog_; 36 scoped_ptr<JavaScriptAppModalDialog> dialog_;
39 GtkWidget* gtk_dialog_; 37 GtkWidget* gtk_dialog_;
40 38
41 DISALLOW_COPY_AND_ASSIGN(JSModalDialogGtk); 39 DISALLOW_COPY_AND_ASSIGN(JSModalDialogGtk);
42 }; 40 };
43 41
44 #endif // CHROME_BROWSER_GTK_JS_MODAL_DIALOG_GTK_H_ 42 #endif // CHROME_BROWSER_GTK_JS_MODAL_DIALOG_GTK_H_
45
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/js_modal_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698