| 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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // On GTK, this comes in for backgrounded tabs. Ignore, to match what | 478 // On GTK, this comes in for backgrounded tabs. Ignore, to match what |
| 479 // happens on Win & Mac, and when the view is shown it'll call this again. | 479 // happens on Win & Mac, and when the view is shown it'll call this again. |
| 480 return; | 480 return; |
| 481 } | 481 } |
| 482 | 482 |
| 483 if (!view_) | 483 if (!view_) |
| 484 return; | 484 return; |
| 485 | 485 |
| 486 last_view_screen_rect_ = view_->GetViewBounds(); | 486 last_view_screen_rect_ = view_->GetViewBounds(); |
| 487 last_window_screen_rect_ = view_->GetBoundsInRootWindow(); | 487 last_window_screen_rect_ = view_->GetBoundsInRootWindow(); |
| 488 view_->OnSendScreenRects(); |
| 488 Send(new ViewMsg_UpdateScreenRects( | 489 Send(new ViewMsg_UpdateScreenRects( |
| 489 GetRoutingID(), last_view_screen_rect_, last_window_screen_rect_)); | 490 GetRoutingID(), last_view_screen_rect_, last_window_screen_rect_)); |
| 490 waiting_for_screen_rects_ack_ = true; | 491 waiting_for_screen_rects_ack_ = true; |
| 491 } | 492 } |
| 492 | 493 |
| 493 void RenderWidgetHostImpl::OnBeginFrame() { | 494 void RenderWidgetHostImpl::OnBeginFrame() { |
| 494 if (begin_frame_callback_) | 495 if (begin_frame_callback_) |
| 495 std::move(begin_frame_callback_).Run(); | 496 std::move(begin_frame_callback_).Run(); |
| 496 } | 497 } |
| 497 | 498 |
| (...skipping 2159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2657 device::mojom::WakeLockType::PreventDisplaySleep, | 2658 device::mojom::WakeLockType::PreventDisplaySleep, |
| 2658 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", | 2659 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", |
| 2659 std::move(request)); | 2660 std::move(request)); |
| 2660 } | 2661 } |
| 2661 } | 2662 } |
| 2662 return wake_lock_.get(); | 2663 return wake_lock_.get(); |
| 2663 } | 2664 } |
| 2664 #endif | 2665 #endif |
| 2665 | 2666 |
| 2666 } // namespace content | 2667 } // namespace content |
| OLD | NEW |