Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: chrome/browser/chromeos/frame/bubble_window.h

Issue 8800032: Make BubbleWindow a Widget override with a BubbleFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dtor. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
10 #include "chrome/browser/ui/dialog_style.h" 9 #include "chrome/browser/ui/dialog_style.h"
10 #include "ui/views/widget/widget.h"
11 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 { 12 namespace chromeos {
28 13
14 extern const SkColor kBubbleWindowBackgroundColor;
15
29 // A window that uses BubbleFrameView as its frame. 16 // A window that uses BubbleFrameView as its frame.
30 class BubbleWindow : public views::NativeWidgetGtk { 17 class BubbleWindow : public views::Widget {
31 public: 18 public:
32 static views::Widget* Create(gfx::NativeWindow parent, 19 static views::Widget* Create(gfx::NativeWindow parent,
33 DialogStyle style, 20 DialogStyle style,
34 views::WidgetDelegate* widget_delegate); 21 views::WidgetDelegate* widget_delegate);
35 22
36 protected: 23 virtual ~BubbleWindow();
37 BubbleWindow(views::Widget* window, DialogStyle style);
38 24
39 // Overridden from views::NativeWidgetGtk: 25 // Overridden from views::Widget:
40 virtual void InitNativeWidget(
41 const views::Widget::InitParams& params) OVERRIDE;
42 virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE; 26 virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
43 27
44 private: 28 private:
29 explicit BubbleWindow(DialogStyle style);
30
45 DialogStyle style_; 31 DialogStyle style_;
46 32
47 DISALLOW_COPY_AND_ASSIGN(BubbleWindow); 33 DISALLOW_COPY_AND_ASSIGN(BubbleWindow);
48 }; 34 };
49 35
50 } // namespace chromeos 36 } // namespace chromeos
51 37
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_ 38 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/bubble_frame_view.cc ('k') | chrome/browser/chromeos/frame/bubble_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698