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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 if (is_hidden_) { 267 if (is_hidden_) {
268 // On GTK, this comes in for backgrounded tabs. Ignore, to match what 268 // On GTK, this comes in for backgrounded tabs. Ignore, to match what
269 // happens on Win & Mac, and when the view is shown it'll call this again. 269 // happens on Win & Mac, and when the view is shown it'll call this again.
270 return; 270 return;
271 } 271 }
272 272
273 if (!view_) 273 if (!view_)
274 return; 274 return;
275 275
276 last_view_screen_rect_ = view_->GetViewBounds(); 276 gfx::Rect new_view_screen_rect = view_->GetViewBounds();
277 last_window_screen_rect_ = view_->GetBoundsInRootWindow(); 277 gfx::Rect new_window_screen_rect = view_->GetBoundsInRootWindow();
278 if (last_view_screen_rect_ == new_view_screen_rect &&
279 last_window_screen_rect_ == new_window_screen_rect)
280 return;
278 Send(new ViewMsg_UpdateScreenRects( 281 Send(new ViewMsg_UpdateScreenRects(
279 GetRoutingID(), last_view_screen_rect_, last_window_screen_rect_)); 282 GetRoutingID(), new_view_screen_rect, new_window_screen_rect));
283 last_view_screen_rect_ = new_view_screen_rect;
284 last_window_screen_rect_ = new_window_screen_rect;
280 waiting_for_screen_rects_ack_ = true; 285 waiting_for_screen_rects_ack_ = true;
281 } 286 }
282 287
283 void RenderWidgetHostImpl::Init() { 288 void RenderWidgetHostImpl::Init() {
284 DCHECK(process_->HasConnection()); 289 DCHECK(process_->HasConnection());
285 290
286 renderer_initialized_ = true; 291 renderer_initialized_ = true;
287 292
288 GpuSurfaceTracker::Get()->SetSurfaceHandle( 293 GpuSurfaceTracker::Get()->SetSurfaceHandle(
289 surface_id_, GetCompositingSurface()); 294 surface_id_, GetCompositingSurface());
(...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 return; 2324 return;
2320 2325
2321 OnRenderAutoResized(new_size); 2326 OnRenderAutoResized(new_size);
2322 } 2327 }
2323 2328
2324 void RenderWidgetHostImpl::DetachDelegate() { 2329 void RenderWidgetHostImpl::DetachDelegate() {
2325 delegate_ = NULL; 2330 delegate_ = NULL;
2326 } 2331 }
2327 2332
2328 } // namespace content 2333 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698