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

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

Issue 11366118: Add support for interstitial pages on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 8 years, 1 month 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) 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/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 return content_view_core_->HasFocus(); 224 return content_view_core_->HasFocus();
225 } 225 }
226 226
227 bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const { 227 bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const {
228 NOTIMPLEMENTED(); 228 NOTIMPLEMENTED();
229 return false; 229 return false;
230 } 230 }
231 231
232 void RenderWidgetHostViewAndroid::Show() { 232 void RenderWidgetHostViewAndroid::Show() {
233 if (content_view_core_) {
234 host_->AttachLayer(texture_layer_->layer());
235 is_hidden_ = false;
236 }
237
233 texture_layer_->layer()->setDrawsContent(true); 238 texture_layer_->layer()->setDrawsContent(true);
234 } 239 }
235 240
236 void RenderWidgetHostViewAndroid::Hide() { 241 void RenderWidgetHostViewAndroid::Hide() {
242 is_hidden_ = true;
243
237 texture_layer_->layer()->setDrawsContent(false); 244 texture_layer_->layer()->setDrawsContent(false);
238 } 245 }
239 246
240 bool RenderWidgetHostViewAndroid::IsShowing() { 247 bool RenderWidgetHostViewAndroid::IsShowing() {
241 return !is_hidden_; 248 return !is_hidden_;
242 } 249 }
243 250
244 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { 251 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
245 gfx::Size bounds = DrawDelegateImpl::GetInstance()->GetBounds(); 252 gfx::Size bounds = DrawDelegateImpl::GetInstance()->GetBounds();
246 if (!bounds.IsEmpty()) 253 if (!bounds.IsEmpty())
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // RenderWidgetHostView, public: 573 // RenderWidgetHostView, public:
567 574
568 // static 575 // static
569 RenderWidgetHostView* 576 RenderWidgetHostView*
570 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 577 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
571 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 578 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
572 return new RenderWidgetHostViewAndroid(rwhi, NULL); 579 return new RenderWidgetHostViewAndroid(rwhi, NULL);
573 } 580 }
574 581
575 } // namespace content 582 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698