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

Side by Side Diff: ui/views/controls/native/native_view_host_gtk.cc

Issue 8915007: views: Rename IsVisibleInRootView() to IsDrawn(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #include "ui/views/controls/native/native_view_host_gtk.h" 5 #include "ui/views/controls/native/native_view_host_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (gtk_widget_get_parent(fixed_)) 166 if (gtk_widget_get_parent(fixed_))
167 GetHostWidget()->ReparentChild(fixed_); 167 GetHostWidget()->ReparentChild(fixed_);
168 else 168 else
169 GetHostWidget()->AddChild(fixed_); 169 GetHostWidget()->AddChild(fixed_);
170 170
171 if (!host_->native_view()) 171 if (!host_->native_view())
172 return; 172 return;
173 173
174 AttachHostWidget(); 174 AttachHostWidget();
175 175
176 if (host_->IsVisibleInRootView()) { 176 if (host_->IsDrawn()) {
177 gtk_widget_show(host_->native_view()); 177 gtk_widget_show(host_->native_view());
178 gtk_widget_show(fixed_); 178 gtk_widget_show(fixed_);
179 } else { 179 } else {
180 gtk_widget_hide(fixed_); 180 gtk_widget_hide(fixed_);
181 } 181 }
182 host_->Layout(); 182 host_->Layout();
183 } 183 }
184 184
185 void NativeViewHostGtk::RemovedFromWidget() { 185 void NativeViewHostGtk::RemovedFromWidget() {
186 if (!host_->native_view()) 186 if (!host_->native_view())
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 //////////////////////////////////////////////////////////////////////////////// 403 ////////////////////////////////////////////////////////////////////////////////
404 // NativeViewHostWrapper, public: 404 // NativeViewHostWrapper, public:
405 405
406 // static 406 // static
407 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( 407 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper(
408 NativeViewHost* host) { 408 NativeViewHost* host) {
409 return new NativeViewHostGtk(host); 409 return new NativeViewHostGtk(host);
410 } 410 }
411 411
412 } // namespace views 412 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/native/native_view_host_aura.cc ('k') | ui/views/controls/native/native_view_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698