| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" | 14 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" |
| 14 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 15 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 15 #include "ui/base/gtk/gtk_signal.h" | 16 #include "ui/base/gtk/gtk_signal.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 17 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
| 18 | 19 |
| 19 typedef struct _GtkWidget GtkWidget; | 20 typedef struct _GtkWidget GtkWidget; |
| 20 | 21 |
| 21 class Profile; | 22 class Profile; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; | 42 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; |
| 42 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 43 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; |
| 43 virtual std::string GetDialogArgs() const OVERRIDE; | 44 virtual std::string GetDialogArgs() const OVERRIDE; |
| 44 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 45 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; |
| 45 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) | 46 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) |
| 46 OVERRIDE; | 47 OVERRIDE; |
| 47 virtual void CloseContents(TabContents* source) OVERRIDE; | 48 virtual void CloseContents(TabContents* source) OVERRIDE; |
| 48 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 49 virtual bool ShouldShowDialogTitle() const OVERRIDE; |
| 49 | 50 |
| 50 // Overridden from TabContentsDelegate: | 51 // Overridden from TabContentsDelegate: |
| 51 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 52 virtual void HandleKeyboardEvent( |
| 53 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 52 | 54 |
| 53 private: | 55 private: |
| 54 CHROMEGTK_CALLBACK_1(HtmlDialogGtk, void, OnResponse, int); | 56 CHROMEGTK_CALLBACK_1(HtmlDialogGtk, void, OnResponse, int); |
| 55 | 57 |
| 56 // This view is a delegate to the HTML content since it needs to get notified | 58 // This view is a delegate to the HTML content since it needs to get notified |
| 57 // about when the dialog is closing. For all other actions (besides dialog | 59 // about when the dialog is closing. For all other actions (besides dialog |
| 58 // closing) we delegate to the creator of this view, which we keep track of | 60 // closing) we delegate to the creator of this view, which we keep track of |
| 59 // using this variable. | 61 // using this variable. |
| 60 HtmlDialogUIDelegate* delegate_; | 62 HtmlDialogUIDelegate* delegate_; |
| 61 | 63 |
| 62 gfx::NativeWindow parent_window_; | 64 gfx::NativeWindow parent_window_; |
| 63 | 65 |
| 64 GtkWidget* dialog_; | 66 GtkWidget* dialog_; |
| 65 | 67 |
| 66 scoped_ptr<TabContentsWrapper> tab_; | 68 scoped_ptr<TabContentsWrapper> tab_; |
| 67 scoped_ptr<TabContentsContainerGtk> tab_contents_container_; | 69 scoped_ptr<TabContentsContainerGtk> tab_contents_container_; |
| 68 | 70 |
| 69 DISALLOW_COPY_AND_ASSIGN(HtmlDialogGtk); | 71 DISALLOW_COPY_AND_ASSIGN(HtmlDialogGtk); |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 #endif // CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ | 74 #endif // CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ |
| OLD | NEW |