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

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

Issue 525523003: Remove two unnecessary params in ViewHostMsg_UpdateRect_Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android build Created 6 years, 3 months 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 <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 view_->DidStopFlinging(); 1482 view_->DidStopFlinging();
1483 } 1483 }
1484 1484
1485 void RenderWidgetHostImpl::OnUpdateRect( 1485 void RenderWidgetHostImpl::OnUpdateRect(
1486 const ViewHostMsg_UpdateRect_Params& params) { 1486 const ViewHostMsg_UpdateRect_Params& params) {
1487 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); 1487 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect");
1488 TimeTicks paint_start = TimeTicks::Now(); 1488 TimeTicks paint_start = TimeTicks::Now();
1489 1489
1490 // Update our knowledge of the RenderWidget's size. 1490 // Update our knowledge of the RenderWidget's size.
1491 current_size_ = params.view_size; 1491 current_size_ = params.view_size;
1492 // Update our knowledge of the RenderWidget's scroll offset.
1493 last_scroll_offset_ = params.scroll_offset;
1494 1492
1495 bool is_resize_ack = 1493 bool is_resize_ack =
1496 ViewHostMsg_UpdateRect_Flags::is_resize_ack(params.flags); 1494 ViewHostMsg_UpdateRect_Flags::is_resize_ack(params.flags);
1497 1495
1498 // resize_ack_pending_ needs to be cleared before we call DidPaintRect, since 1496 // resize_ack_pending_ needs to be cleared before we call DidPaintRect, since
1499 // that will end up reaching GetBackingStore. 1497 // that will end up reaching GetBackingStore.
1500 if (is_resize_ack) { 1498 if (is_resize_ack) {
1501 DCHECK(!g_check_for_pending_resize_ack || resize_ack_pending_); 1499 DCHECK(!g_check_for_pending_resize_ack || resize_ack_pending_);
1502 resize_ack_pending_ = false; 1500 resize_ack_pending_ = false;
1503 } 1501 }
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 } else if (type == UNEXPECTED_EVENT_TYPE) { 1893 } else if (type == UNEXPECTED_EVENT_TYPE) {
1896 suppress_next_char_events_ = false; 1894 suppress_next_char_events_ = false;
1897 } 1895 }
1898 } 1896 }
1899 1897
1900 void RenderWidgetHostImpl::OnSyntheticGestureCompleted( 1898 void RenderWidgetHostImpl::OnSyntheticGestureCompleted(
1901 SyntheticGesture::Result result) { 1899 SyntheticGesture::Result result) {
1902 Send(new InputMsg_SyntheticGestureCompleted(GetRoutingID())); 1900 Send(new InputMsg_SyntheticGestureCompleted(GetRoutingID()));
1903 } 1901 }
1904 1902
1905 const gfx::Vector2d& RenderWidgetHostImpl::GetLastScrollOffset() const {
1906 return last_scroll_offset_;
1907 }
1908
1909 bool RenderWidgetHostImpl::IgnoreInputEvents() const { 1903 bool RenderWidgetHostImpl::IgnoreInputEvents() const {
1910 return ignore_input_events_ || process_->IgnoreInputEvents(); 1904 return ignore_input_events_ || process_->IgnoreInputEvents();
1911 } 1905 }
1912 1906
1913 bool RenderWidgetHostImpl::ShouldForwardTouchEvent() const { 1907 bool RenderWidgetHostImpl::ShouldForwardTouchEvent() const {
1914 // It's important that the emulator sees a complete native touch stream, 1908 // It's important that the emulator sees a complete native touch stream,
1915 // allowing it to perform touch filtering as appropriate. 1909 // allowing it to perform touch filtering as appropriate.
1916 // TODO(dgozman): Remove when touch stream forwarding issues resolved, see 1910 // TODO(dgozman): Remove when touch stream forwarding issues resolved, see
1917 // crbug.com/375940. 1911 // crbug.com/375940.
1918 if (touch_emulator_ && touch_emulator_->enabled()) 1912 if (touch_emulator_ && touch_emulator_->enabled())
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 } 2311 }
2318 #endif 2312 #endif
2319 2313
2320 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2314 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2321 if (view_) 2315 if (view_)
2322 return view_->PreferredReadbackFormat(); 2316 return view_->PreferredReadbackFormat();
2323 return kN32_SkColorType; 2317 return kN32_SkColorType;
2324 } 2318 }
2325 2319
2326 } // namespace content 2320 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698