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

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

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 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
11 #include "base/auto_reset.h" 11 #include "base/auto_reset.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/message_loop/message_loop.h" 17 #include "base/location.h"
18 #include "base/metrics/field_trial.h" 18 #include "base/metrics/field_trial.h"
19 #include "base/metrics/histogram.h" 19 #include "base/metrics/histogram.h"
20 #include "base/single_thread_task_runner.h"
20 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
22 #include "base/thread_task_runner_handle.h" 23 #include "base/thread_task_runner_handle.h"
23 #include "base/trace_event/trace_event.h" 24 #include "base/trace_event/trace_event.h"
24 #include "cc/base/switches.h" 25 #include "cc/base/switches.h"
25 #include "cc/output/compositor_frame.h" 26 #include "cc/output/compositor_frame.h"
26 #include "cc/output/compositor_frame_ack.h" 27 #include "cc/output/compositor_frame_ack.h"
27 #include "content/browser/accessibility/accessibility_mode_helper.h" 28 #include "content/browser/accessibility/accessibility_mode_helper.h"
28 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 29 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
29 #include "content/browser/bad_message.h" 30 #include "content/browser/bad_message.h"
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 } 1528 }
1528 1529
1529 DCHECK(!params.view_size.IsEmpty()); 1530 DCHECK(!params.view_size.IsEmpty());
1530 1531
1531 DidUpdateBackingStore(params, paint_start); 1532 DidUpdateBackingStore(params, paint_start);
1532 1533
1533 if (auto_resize_enabled_) { 1534 if (auto_resize_enabled_) {
1534 bool post_callback = new_auto_size_.IsEmpty(); 1535 bool post_callback = new_auto_size_.IsEmpty();
1535 new_auto_size_ = params.view_size; 1536 new_auto_size_ = params.view_size;
1536 if (post_callback) { 1537 if (post_callback) {
1537 base::MessageLoop::current()->PostTask( 1538 base::ThreadTaskRunnerHandle::Get()->PostTask(
1538 FROM_HERE, 1539 FROM_HERE, base::Bind(&RenderWidgetHostImpl::DelayedAutoResized,
1539 base::Bind(&RenderWidgetHostImpl::DelayedAutoResized, 1540 weak_factory_.GetWeakPtr()));
1540 weak_factory_.GetWeakPtr()));
1541 } 1541 }
1542 } 1542 }
1543 1543
1544 // Log the time delta for processing a paint message. On platforms that don't 1544 // Log the time delta for processing a paint message. On platforms that don't
1545 // support asynchronous painting, this is equivalent to 1545 // support asynchronous painting, this is equivalent to
1546 // MPArch.RWH_TotalPaintTime. 1546 // MPArch.RWH_TotalPaintTime.
1547 TimeDelta delta = TimeTicks::Now() - paint_start; 1547 TimeDelta delta = TimeTicks::Now() - paint_start;
1548 UMA_HISTOGRAM_TIMES("MPArch.RWH_OnMsgUpdateRect", delta); 1548 UMA_HISTOGRAM_TIMES("MPArch.RWH_OnMsgUpdateRect", delta);
1549 } 1549 }
1550 1550
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 } 2111 }
2112 2112
2113 #if defined(OS_WIN) 2113 #if defined(OS_WIN)
2114 gfx::NativeViewAccessible 2114 gfx::NativeViewAccessible
2115 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2115 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2116 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2116 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2117 } 2117 }
2118 #endif 2118 #endif
2119 2119
2120 } // namespace content 2120 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698