OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |