| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/tab_contents/constrained_window.h" | 8 #include "chrome/browser/tab_contents/constrained_window.h" |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "chrome/common/owned_widget_gtk.h" | 11 #include "chrome/common/owned_widget_gtk.h" |
| 12 | 12 |
| 13 class TabContents; | 13 class TabContents; |
| 14 class TabContentsViewGtk; | 14 class TabContentsViewGtk; |
| 15 typedef struct _GtkWidget GtkWidget; | 15 typedef struct _GtkWidget GtkWidget; |
| 16 | 16 |
| 17 class ConstrainedWindowGtkDelegate { | 17 class ConstrainedWindowGtkDelegate { |
| 18 public: | 18 public: |
| 19 // Returns the widget that will be put in the constrained window's container. | 19 // Returns the widget that will be put in the constrained window's container. |
| 20 virtual GtkWidget* GetWidgetRoot() = 0; | 20 virtual GtkWidget* GetWidgetRoot() = 0; |
| 21 | 21 |
| 22 // Tells the delegate to either delete itself or set up a task to delete | 22 // Tells the delegate to either delete itself or set up a task to delete |
| 23 // itself later. | 23 // itself later. |
| 24 virtual void DeleteDelegate() = 0; | 24 virtual void DeleteDelegate() = 0; |
| 25 | |
| 26 protected: | |
| 27 ~ConstrainedWindowGtkDelegate() {} | |
| 28 }; | 25 }; |
| 29 | 26 |
| 30 // Constrained window implementation for the GTK port. Unlike the Win32 system, | 27 // Constrained window implementation for the GTK port. Unlike the Win32 system, |
| 31 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just | 28 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just |
| 32 // centers the dialog. It is thus an order of magnitude simpler. | 29 // centers the dialog. It is thus an order of magnitude simpler. |
| 33 class ConstrainedWindowGtk : public ConstrainedWindow { | 30 class ConstrainedWindowGtk : public ConstrainedWindow { |
| 34 public: | 31 public: |
| 35 virtual ~ConstrainedWindowGtk(); | 32 virtual ~ConstrainedWindowGtk(); |
| 36 | 33 |
| 37 // Overridden from ConstrainedWindow: | 34 // Overridden from ConstrainedWindow: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 58 // The top level widget container that exports to our TabContentsViewGtk. | 55 // The top level widget container that exports to our TabContentsViewGtk. |
| 59 OwnedWidgetGtk border_; | 56 OwnedWidgetGtk border_; |
| 60 | 57 |
| 61 // Delegate that provides the contents of this constrained window. | 58 // Delegate that provides the contents of this constrained window. |
| 62 ConstrainedWindowGtkDelegate* delegate_; | 59 ConstrainedWindowGtkDelegate* delegate_; |
| 63 | 60 |
| 64 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); | 61 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); |
| 65 }; | 62 }; |
| 66 | 63 |
| 67 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ | 64 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ |
| OLD | NEW |