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 |
(...skipping 18 matching lines...) Expand all Loading... | |
29 | 29 |
30 // Returns the widget that should get focus when ConstrainedWindow is focused. | 30 // Returns the widget that should get focus when ConstrainedWindow is focused. |
31 virtual GtkWidget* GetFocusWidget() = 0; | 31 virtual GtkWidget* GetFocusWidget() = 0; |
32 | 32 |
33 // Tells the delegate to either delete itself or set up a task to delete | 33 // Tells the delegate to either delete itself or set up a task to delete |
34 // itself later. | 34 // itself later. |
35 virtual void DeleteDelegate() = 0; | 35 virtual void DeleteDelegate() = 0; |
36 | 36 |
37 virtual bool GetBackgroundColor(GdkColor* color); | 37 virtual bool GetBackgroundColor(GdkColor* color); |
38 | 38 |
39 virtual bool ShouldHaveBorderPadding() const; | |
oshima
2011/03/10 17:46:11
Comment?
xiyuan
2011/03/10 17:54:50
Done.
| |
40 | |
39 protected: | 41 protected: |
40 virtual ~ConstrainedWindowGtkDelegate(); | 42 virtual ~ConstrainedWindowGtkDelegate(); |
41 }; | 43 }; |
42 | 44 |
43 // Constrained window implementation for the GTK port. Unlike the Win32 system, | 45 // Constrained window implementation for the GTK port. Unlike the Win32 system, |
44 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just | 46 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just |
45 // centers the dialog. It is thus an order of magnitude simpler. | 47 // centers the dialog. It is thus an order of magnitude simpler. |
46 class ConstrainedWindowGtk : public ConstrainedWindow { | 48 class ConstrainedWindowGtk : public ConstrainedWindow { |
47 public: | 49 public: |
48 #if defined(TOUCH_UI) | 50 #if defined(TOUCH_UI) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 | 92 |
91 // Stores if |ShowConstrainedWindow()| has been called. | 93 // Stores if |ShowConstrainedWindow()| has been called. |
92 bool visible_; | 94 bool visible_; |
93 | 95 |
94 ScopedRunnableMethodFactory<ConstrainedWindowGtk> factory_; | 96 ScopedRunnableMethodFactory<ConstrainedWindowGtk> factory_; |
95 | 97 |
96 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); | 98 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); |
97 }; | 99 }; |
98 | 100 |
99 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ | 101 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ |
OLD | NEW |