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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 23866013: Make the RenderViewHostImpl update its visibility after a swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make the invidual implementations of RWHVX::Show() also show their associated views. Created 7 years, 3 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 | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.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) 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 "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const { 348 bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const {
349 return HasValidFrame(); 349 return HasValidFrame();
350 } 350 }
351 351
352 void RenderWidgetHostViewAndroid::Show() { 352 void RenderWidgetHostViewAndroid::Show() {
353 if (are_layers_attached_) 353 if (are_layers_attached_)
354 return; 354 return;
355 355
356 are_layers_attached_ = true; 356 are_layers_attached_ = true;
357 AttachLayers(); 357 AttachLayers();
358
359 WasShown();
jamesr 2013/09/18 18:06:53 render_widget_host_view_win.cc has this comment:
358 } 360 }
359 361
360 void RenderWidgetHostViewAndroid::Hide() { 362 void RenderWidgetHostViewAndroid::Hide() {
jamesr 2013/09/18 18:06:53 RWHVWin and RWHVMac calls WasHidden() too, you pro
361 if (!are_layers_attached_) 363 if (!are_layers_attached_)
362 return; 364 return;
363 365
364 are_layers_attached_ = false; 366 are_layers_attached_ = false;
365 RemoveLayers(); 367 RemoveLayers();
366 } 368 }
367 369
368 bool RenderWidgetHostViewAndroid::IsShowing() { 370 bool RenderWidgetHostViewAndroid::IsShowing() {
369 // ContentViewCoreImpl represents the native side of the Java 371 // ContentViewCoreImpl represents the native side of the Java
370 // ContentViewCore. It being NULL means that it is not attached 372 // ContentViewCore. It being NULL means that it is not attached
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 // RenderWidgetHostView, public: 1305 // RenderWidgetHostView, public:
1304 1306
1305 // static 1307 // static
1306 RenderWidgetHostView* 1308 RenderWidgetHostView*
1307 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1309 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1308 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1310 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1309 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1311 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1310 } 1312 }
1311 1313
1312 } // namespace content 1314 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698