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