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

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

Issue 11421166: Update screen rects when showing an infobar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Inform the renderer that we are being hidden so it can reduce its resource 112 // Inform the renderer that we are being hidden so it can reduce its resource
113 // utilization. 113 // utilization.
114 host_->WasHidden(); 114 host_->WasHidden();
115 } 115 }
116 116
117 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { 117 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) {
118 if (surface_texture_transport_.get()) 118 if (surface_texture_transport_.get())
119 surface_texture_transport_->SetSize(size); 119 surface_texture_transport_->SetSize(size);
120 120
121 host_->SendScreenRects();
121 host_->WasResized(); 122 host_->WasResized();
122 } 123 }
123 124
124 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) { 125 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) {
125 if (rect.origin().x() || rect.origin().y()) { 126 if (rect.origin().x() || rect.origin().y()) {
126 VLOG(0) << "SetBounds not implemented for (x,y)!=(0,0)"; 127 VLOG(0) << "SetBounds not implemented for (x,y)!=(0,0)";
127 } 128 }
128 SetSize(rect.size()); 129 SetSize(rect.size());
130 host_->SendScreenRects();
129 } 131 }
130 132
131 WebKit::WebGLId RenderWidgetHostViewAndroid::GetScaledContentTexture( 133 WebKit::WebGLId RenderWidgetHostViewAndroid::GetScaledContentTexture(
132 const gfx::Size& size) { 134 const gfx::Size& size) {
133 if (!CompositorImpl::IsInitialized() || 135 if (!CompositorImpl::IsInitialized() ||
134 texture_id_in_layer_ == 0 || 136 texture_id_in_layer_ == 0 ||
135 texture_size_in_layer_.IsEmpty()) 137 texture_size_in_layer_.IsEmpty())
136 return 0; 138 return 0;
137 139
138 GLHelper* helper = ImageTransportFactoryAndroid::GetInstance()->GetGLHelper(); 140 GLHelper* helper = ImageTransportFactoryAndroid::GetInstance()->GetGLHelper();
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 // RenderWidgetHostView, public: 597 // RenderWidgetHostView, public:
596 598
597 // static 599 // static
598 RenderWidgetHostView* 600 RenderWidgetHostView*
599 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 601 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
600 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 602 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
601 return new RenderWidgetHostViewAndroid(rwhi, NULL); 603 return new RenderWidgetHostViewAndroid(rwhi, NULL);
602 } 604 }
603 605
604 } // namespace content 606 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698