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

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

Issue 7273084: Change the meaning of "Widget::GetTopLevelWidget()" to mean the logical top level Window in the v... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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_view.h ('k') | views/widget/native_widget_views.h » ('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_view.h" 5 #include "views/widget/native_widget_view.h"
6 6
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 8
9 namespace views { 9 namespace views {
10 namespace internal { 10 namespace internal {
11 11
12 //////////////////////////////////////////////////////////////////////////////// 12 ////////////////////////////////////////////////////////////////////////////////
13 // NativeWidgetView, public: 13 // NativeWidgetView, public:
14 14
15 // static 15 // static
16 const char NativeWidgetView::kViewClassName[] = "views/NativeWidgetView"; 16 const char NativeWidgetView::kViewClassName[] = "views/NativeWidgetView";
17 17
18 NativeWidgetView::NativeWidgetView(NativeWidgetViews* native_widget) 18 NativeWidgetView::NativeWidgetView(NativeWidgetViews* native_widget)
19 : native_widget_(native_widget), 19 : native_widget_(native_widget),
20 sent_create_(false) { 20 sent_create_(false),
21 delete_native_widget_(true) {
21 } 22 }
22 23
23 NativeWidgetView::~NativeWidgetView() { 24 NativeWidgetView::~NativeWidgetView() {
25 if (delete_native_widget_) {
26 native_widget_->set_delete_native_view(false);
27 delete native_widget_;
28 }
24 } 29 }
25 30
26 Widget* NativeWidgetView::GetAssociatedWidget() { 31 Widget* NativeWidgetView::GetAssociatedWidget() {
27 return native_widget_->delegate()->AsWidget(); 32 return native_widget_->delegate()->AsWidget();
28 } 33 }
29 34
30 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
31 // NativeWidgetView, View overrides: 36 // NativeWidgetView, View overrides:
32 37
33 void NativeWidgetView::SchedulePaintInternal(const gfx::Rect& r) { 38 void NativeWidgetView::SchedulePaintInternal(const gfx::Rect& r) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 170 }
166 171
167 void NativeWidgetView::PaintComposite() { 172 void NativeWidgetView::PaintComposite() {
168 View::PaintComposite(); 173 View::PaintComposite();
169 GetAssociatedWidget()->GetRootView()->PaintComposite(); 174 GetAssociatedWidget()->GetRootView()->PaintComposite();
170 } 175 }
171 176
172 } // namespace internal 177 } // namespace internal
173 } // namespace views 178 } // namespace views
174 179
OLDNEW
« no previous file with comments | « views/widget/native_widget_view.h ('k') | views/widget/native_widget_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698