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

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

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/widget/native_widget_views.h ('k') | views/window/native_window_gtk.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 #include "views/widget/native_widget_views.h" 5 #include "views/widget/native_widget_views.h"
6 6
7 #include "views/view.h" 7 #include "views/view.h"
8 #include "views/widget/native_widget_view.h" 8 #include "views/widget/native_widget_view.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 //////////////////////////////////////////////////////////////////////////////// 12 ////////////////////////////////////////////////////////////////////////////////
13 // NativeWidgetViews, public: 13 // NativeWidgetViews, public:
14 14
15 NativeWidgetViews::NativeWidgetViews(View* host, 15 NativeWidgetViews::NativeWidgetViews(View* host,
16 internal::NativeWidgetDelegate* delegate) 16 internal::NativeWidgetDelegate* delegate)
17 : delegate_(delegate), 17 : delegate_(delegate),
18 view_(NULL), 18 view_(NULL),
19 host_view_(host), 19 host_view_(host),
20 ALLOW_THIS_IN_INITIALIZER_LIST(close_widget_factory_(this)) { 20 ALLOW_THIS_IN_INITIALIZER_LIST(close_widget_factory_(this)) {
21 } 21 }
22 22
23 NativeWidgetViews::~NativeWidgetViews() { 23 NativeWidgetViews::~NativeWidgetViews() {
24 } 24 }
25 25
26 View* NativeWidgetViews::GetView() { 26 View* NativeWidgetViews::GetView() {
27 return view_; 27 return view_;
28 } 28 }
29 29
30 const View* NativeWidgetViews::GetView() const {
31 return view_;
32 }
33
30 //////////////////////////////////////////////////////////////////////////////// 34 ////////////////////////////////////////////////////////////////////////////////
31 // NativeWidgetViews, NativeWidget implementation: 35 // NativeWidgetViews, NativeWidget implementation:
32 36
33 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { 37 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) {
34 view_ = new internal::NativeWidgetView(this); 38 view_ = new internal::NativeWidgetView(this);
35 host_view_->AddChildView(view_); 39 host_view_->AddChildView(view_);
36 40
37 // TODO(beng): handle parenting. 41 // TODO(beng): handle parenting.
38 // TODO(beng): SetInitParams(). 42 // TODO(beng): SetInitParams().
39 } 43 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 NativeWidget* NativeWidgetViews::GetParentNativeWidget() { 217 NativeWidget* NativeWidgetViews::GetParentNativeWidget() {
214 return view_->GetWidget()->native_widget(); 218 return view_->GetWidget()->native_widget();
215 } 219 }
216 220
217 const NativeWidget* NativeWidgetViews::GetParentNativeWidget() const { 221 const NativeWidget* NativeWidgetViews::GetParentNativeWidget() const {
218 return view_->GetWidget()->native_widget(); 222 return view_->GetWidget()->native_widget();
219 } 223 }
220 224
221 } // namespace views 225 } // namespace views
222 226
OLDNEW
« no previous file with comments | « views/widget/native_widget_views.h ('k') | views/window/native_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698