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

Side by Side Diff: views/widget/native_widget_views.h

Issue 7069022: Adds a basic NativeWindowViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months 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
« no previous file with comments | « views/views.gyp ('k') | views/widget/native_widget_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_
6 #define VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ 6 #define VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "views/widget/native_widget.h" 10 #include "views/widget/native_widget.h"
11 11
12 namespace views { 12 namespace views {
13 namespace internal { 13 namespace internal {
14 class NativeWidgetView; 14 class NativeWidgetView;
15 } 15 }
16 16
17 //////////////////////////////////////////////////////////////////////////////// 17 ////////////////////////////////////////////////////////////////////////////////
18 // NativeWidgetViews 18 // NativeWidgetViews
19 // 19 //
20 // A NativeWidget implementation that uses another View as its native widget. 20 // A NativeWidget implementation that uses another View as its native widget.
21 // 21 //
22 class NativeWidgetViews : public NativeWidget { 22 class NativeWidgetViews : public NativeWidget {
23 public: 23 public:
24 NativeWidgetViews(View* host, internal::NativeWidgetDelegate* delegate); 24 NativeWidgetViews(View* host, internal::NativeWidgetDelegate* delegate);
25 virtual ~NativeWidgetViews(); 25 virtual ~NativeWidgetViews();
26 26
27 // TODO(beng): remove. 27 // TODO(beng): remove.
28 View* GetView(); 28 View* GetView();
29 const View* GetView() const;
29 30
30 internal::NativeWidgetDelegate* delegate() { return delegate_; } 31 internal::NativeWidgetDelegate* delegate() { return delegate_; }
31 32
32 private: 33 private:
33 // Overridden from NativeWidget: 34 // Overridden from NativeWidget:
34 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; 35 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
35 virtual Widget* GetWidget() OVERRIDE; 36 virtual Widget* GetWidget() OVERRIDE;
36 virtual const Widget* GetWidget() const OVERRIDE; 37 virtual const Widget* GetWidget() const OVERRIDE;
37 virtual gfx::NativeView GetNativeView() const OVERRIDE; 38 virtual gfx::NativeView GetNativeView() const OVERRIDE;
38 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; 39 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // The following factory is used for calls to close the NativeWidgetViews 88 // The following factory is used for calls to close the NativeWidgetViews
88 // instance. 89 // instance.
89 ScopedRunnableMethodFactory<NativeWidgetViews> close_widget_factory_; 90 ScopedRunnableMethodFactory<NativeWidgetViews> close_widget_factory_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViews); 92 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViews);
92 }; 93 };
93 94
94 } 95 }
95 96
96 #endif // VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ 97 #endif // VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_
OLDNEW
« no previous file with comments | « views/views.gyp ('k') | views/widget/native_widget_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698