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_CHROMEOS_FRAME_BUBBLE_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_WINDOW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_WINDOW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_WINDOW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/chromeos/frame/bubble_window_style.h" | 9 #include "chrome/browser/ui/dialog_style.h" |
10 | 10 |
11 #if defined(TOOLKIT_USES_GTK) | 11 #if defined(TOOLKIT_USES_GTK) |
12 // TODO(msw): While I dislike the includes and code to be mixed into the same | 12 // TODO(msw): While I dislike the includes and code to be mixed into the same |
13 // preprocessor conditional, this seems okay as I can hopefully fix this up | 13 // preprocessor conditional, this seems okay as I can hopefully fix this up |
14 // in a matter of days / crbug.com/98322. | 14 // in a matter of days / crbug.com/98322. |
15 #include "views/widget/native_widget_gtk.h" | 15 #include "views/widget/native_widget_gtk.h" |
16 #else // TOOLKIT_USES_GTK | 16 #else // TOOLKIT_USES_GTK |
17 #include "views/view.h" | 17 #include "views/view.h" |
18 #endif | 18 #endif |
19 | 19 |
20 namespace views { | 20 namespace views { |
21 class WidgetDelegate; | 21 class WidgetDelegate; |
22 } | 22 } |
23 | 23 |
24 #if defined(TOOLKIT_USES_GTK) | 24 #if defined(TOOLKIT_USES_GTK) |
25 // TODO(msw): To fix as explained above (crbug.com/98322). | 25 // TODO(msw): To fix as explained above (crbug.com/98322). |
26 namespace chromeos { | 26 namespace chromeos { |
27 | 27 |
28 // A window that uses BubbleFrameView as its frame. | 28 // A window that uses BubbleFrameView as its frame. |
29 class BubbleWindow : public views::NativeWidgetGtk { | 29 class BubbleWindow : public views::NativeWidgetGtk { |
30 public: | 30 public: |
31 static views::Widget* Create(gfx::NativeWindow parent, | 31 static views::Widget* Create(gfx::NativeWindow parent, |
32 BubbleWindowStyle style, | 32 DialogStyle style, |
33 views::WidgetDelegate* widget_delegate); | 33 views::WidgetDelegate* widget_delegate); |
34 | 34 |
35 protected: | 35 protected: |
36 BubbleWindow(views::Widget* window, BubbleWindowStyle style); | 36 BubbleWindow(views::Widget* window, DialogStyle style); |
37 | 37 |
38 // Overridden from views::NativeWidgetGtk: | 38 // Overridden from views::NativeWidgetGtk: |
39 virtual void InitNativeWidget( | 39 virtual void InitNativeWidget( |
40 const views::Widget::InitParams& params) OVERRIDE; | 40 const views::Widget::InitParams& params) OVERRIDE; |
41 virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | 41 virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE; |
42 | 42 |
43 private: | 43 private: |
44 BubbleWindowStyle style_; | 44 DialogStyle style_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(BubbleWindow); | 46 DISALLOW_COPY_AND_ASSIGN(BubbleWindow); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace chromeos | 49 } // namespace chromeos |
50 | 50 |
51 #else // TOOLKIT_USES_GTK | 51 #else // TOOLKIT_USES_GTK |
52 | 52 |
53 namespace chromeos { | 53 namespace chromeos { |
54 | 54 |
55 class BubbleWindow { | 55 class BubbleWindow { |
56 public: | 56 public: |
57 static views::Widget* Create(gfx::NativeWindow parent, | 57 static views::Widget* Create(gfx::NativeWindow parent, |
58 BubbleWindowStyle style, | 58 DialogStyle style, |
59 views::WidgetDelegate* widget_delegate) { | 59 views::WidgetDelegate* widget_delegate) { |
60 NOTIMPLEMENTED(); | 60 NOTIMPLEMENTED(); |
61 return NULL; | 61 return NULL; |
62 } | 62 } |
63 }; | 63 }; |
64 | 64 |
65 } // namespace chromeos | 65 } // namespace chromeos |
66 | 66 |
67 #endif // TOOLKIT_USES_GTK | 67 #endif // TOOLKIT_USES_GTK |
68 | 68 |
69 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_WINDOW_H_ | 69 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_WINDOW_H_ |
OLD | NEW |