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

Side by Side Diff: ui/views/window/non_client_view.cc

Issue 10384068: views: Have a more accurate name for View parent_owned accessors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | « ui/views/view.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/window/non_client_view.h" 5 #include "ui/views/window/non_client_view.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/base/hit_test.h" 8 #include "ui/base/hit_test.h"
9 #include "ui/views/widget/root_view.h" 9 #include "ui/views/widget/root_view.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 NonClientView::~NonClientView() { 38 NonClientView::~NonClientView() {
39 // This value may have been reset before the window hierarchy shuts down, 39 // This value may have been reset before the window hierarchy shuts down,
40 // so we need to manually remove it. 40 // so we need to manually remove it.
41 RemoveChildView(frame_view_.get()); 41 RemoveChildView(frame_view_.get());
42 } 42 }
43 43
44 void NonClientView::SetFrameView(NonClientFrameView* frame_view) { 44 void NonClientView::SetFrameView(NonClientFrameView* frame_view) {
45 // See comment in header about ownership. 45 // See comment in header about ownership.
46 frame_view->set_parent_owned(false); 46 frame_view->set_owned_by_client();
47 if (frame_view_.get()) 47 if (frame_view_.get())
48 RemoveChildView(frame_view_.get()); 48 RemoveChildView(frame_view_.get());
49 frame_view_.reset(frame_view); 49 frame_view_.reset(frame_view);
50 if (parent()) 50 if (parent())
51 AddChildViewAt(frame_view_.get(), kFrameViewIndex); 51 AddChildViewAt(frame_view_.get(), kFrameViewIndex);
52 } 52 }
53 53
54 bool NonClientView::CanClose() { 54 bool NonClientView::CanClose() {
55 return client_view_->CanClose(); 55 return client_view_->CanClose();
56 } 56 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 std::string NonClientFrameView::GetClassName() const { 272 std::string NonClientFrameView::GetClassName() const {
273 return kViewClassName; 273 return kViewClassName;
274 } 274 }
275 275
276 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 276 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
277 // Overridden to do nothing. The NonClientView manually calls Layout on the 277 // Overridden to do nothing. The NonClientView manually calls Layout on the
278 // FrameView when it is itself laid out, see comment in NonClientView::Layout. 278 // FrameView when it is itself laid out, see comment in NonClientView::Layout.
279 } 279 }
280 280
281 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698