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/input/touch_input_browsertest.cc

Issue 501033003: Remove implicit conversions from scoped_refptr to T* in content/browser/renderer_host/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/gpu/compositor_util.h" 8 #include "content/browser/gpu/compositor_util.h"
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 static_cast<WebContentsImpl*>(shell()->web_contents()); 149 static_cast<WebContentsImpl*>(shell()->web_contents());
150 RenderWidgetHostImpl* host = 150 RenderWidgetHostImpl* host =
151 RenderWidgetHostImpl::From(web_contents->GetRenderViewHost()); 151 RenderWidgetHostImpl::From(web_contents->GetRenderViewHost());
152 host->GetView()->SetSize(gfx::Size(400, 400)); 152 host->GetView()->SetSize(gfx::Size(400, 400));
153 153
154 // The page is loaded in the renderer, wait for a new frame to arrive. 154 // The page is loaded in the renderer, wait for a new frame to arrive.
155 while (!host->ScheduleComposite()) 155 while (!host->ScheduleComposite())
156 GiveItSomeTime(); 156 GiveItSomeTime();
157 157
158 filter_ = new InputEventMessageFilter(); 158 filter_ = new InputEventMessageFilter();
159 host->GetProcess()->AddFilter(filter_); 159 host->GetProcess()->AddFilter(filter_.get());
160 } 160 }
161 161
162 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE { 162 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE {
163 cmd->AppendSwitchASCII(switches::kTouchEvents, 163 cmd->AppendSwitchASCII(switches::kTouchEvents,
164 switches::kTouchEventsEnabled); 164 switches::kTouchEventsEnabled);
165 } 165 }
166 166
167 scoped_refptr<InputEventMessageFilter> filter_; 167 scoped_refptr<InputEventMessageFilter> filter_;
168 }; 168 };
169 169
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, 244 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS,
245 filter()->last_ack_state()); 245 filter()->last_ack_state());
246 246
247 touch.PressPoint(25, 125); 247 touch.PressPoint(25, 125);
248 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo()); 248 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo());
249 filter()->WaitForAck(WebInputEvent::TouchStart); 249 filter()->WaitForAck(WebInputEvent::TouchStart);
250 EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED, filter()->last_ack_state()); 250 EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED, filter()->last_ack_state());
251 } 251 }
252 252
253 } // namespace content 253 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698