| 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_CONSTRAINED_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" |
| 12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 13 #include "base/task.h" | 14 #include "base/task.h" |
| 14 #include "chrome/browser/ui/constrained_window.h" | 15 #include "chrome/browser/ui/constrained_window.h" |
| 15 #include "ui/base/gtk/gtk_signal.h" | 16 #include "ui/base/gtk/gtk_signal.h" |
| 16 #include "ui/base/gtk/owned_widget_gtk.h" | 17 #include "ui/base/gtk/owned_widget_gtk.h" |
| 17 | 18 |
| 18 class TabContentsWrapper; | 19 class TabContentsWrapper; |
| 19 typedef struct _GdkColor GdkColor; | 20 typedef struct _GdkColor GdkColor; |
| 20 #if defined(TOUCH_UI) | 21 #if defined(TOUCH_UI) |
| 21 class TabContentsViewViews; | 22 class TabContentsViewViews; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 typedef NativeTabContentsViewGtk TabContentsViewType; | 58 typedef NativeTabContentsViewGtk TabContentsViewType; |
| 58 #else | 59 #else |
| 59 typedef ChromeTabContentsViewWrapperGtk TabContentsViewType; | 60 typedef ChromeTabContentsViewWrapperGtk TabContentsViewType; |
| 60 #endif | 61 #endif |
| 61 | 62 |
| 62 ConstrainedWindowGtk(TabContentsWrapper* wrapper, | 63 ConstrainedWindowGtk(TabContentsWrapper* wrapper, |
| 63 ConstrainedWindowGtkDelegate* delegate); | 64 ConstrainedWindowGtkDelegate* delegate); |
| 64 virtual ~ConstrainedWindowGtk(); | 65 virtual ~ConstrainedWindowGtk(); |
| 65 | 66 |
| 66 // Overridden from ConstrainedWindow: | 67 // Overridden from ConstrainedWindow: |
| 67 virtual void ShowConstrainedWindow(); | 68 virtual void ShowConstrainedWindow() OVERRIDE; |
| 68 virtual void CloseConstrainedWindow(); | 69 virtual void CloseConstrainedWindow() OVERRIDE; |
| 69 virtual void FocusConstrainedWindow(); | 70 virtual void FocusConstrainedWindow() OVERRIDE; |
| 70 | 71 |
| 71 // Returns the TabContentsWrapper that constrains this Constrained Window. | 72 // Returns the TabContentsWrapper that constrains this Constrained Window. |
| 72 TabContentsWrapper* owner() const { return wrapper_; } | 73 TabContentsWrapper* owner() const { return wrapper_; } |
| 73 | 74 |
| 74 // Returns the toplevel widget that displays this "window". | 75 // Returns the toplevel widget that displays this "window". |
| 75 GtkWidget* widget() { return border_.get(); } | 76 GtkWidget* widget() { return border_.get(); } |
| 76 | 77 |
| 77 // Returns the View that we collaborate with to position ourselves. | 78 // Returns the View that we collaborate with to position ourselves. |
| 78 TabContentsViewType* ContainingView(); | 79 TabContentsViewType* ContainingView(); |
| 79 | 80 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 97 | 98 |
| 98 // Stores if |ShowConstrainedWindow()| has been called. | 99 // Stores if |ShowConstrainedWindow()| has been called. |
| 99 bool visible_; | 100 bool visible_; |
| 100 | 101 |
| 101 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_; | 102 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); | 104 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ | 107 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ |
| OLD | NEW |