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

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

Issue 821223002: Pass gesture detector config type when enabling touch emulator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@touch-emulator-enabled
Patch Set: Created 6 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 <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 void RenderWidgetHostImpl::OnBlur() { 1589 void RenderWidgetHostImpl::OnBlur() {
1590 // Only RenderViewHost can deal with that message. 1590 // Only RenderViewHost can deal with that message.
1591 RecordAction(base::UserMetricsAction("BadMessageTerminate_RWH5")); 1591 RecordAction(base::UserMetricsAction("BadMessageTerminate_RWH5"));
1592 GetProcess()->ReceivedBadMessage(); 1592 GetProcess()->ReceivedBadMessage();
1593 } 1593 }
1594 1594
1595 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { 1595 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) {
1596 SetCursor(cursor); 1596 SetCursor(cursor);
1597 } 1597 }
1598 1598
1599 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled(bool enabled) { 1599 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled(
1600 bool enabled, ui::GestureProviderConfigType config_type) {
1600 if (enabled) { 1601 if (enabled) {
1601 if (!touch_emulator_) 1602 if (!touch_emulator_)
1602 touch_emulator_.reset(new TouchEmulator(this)); 1603 touch_emulator_.reset(new TouchEmulator(this));
1603 touch_emulator_->Enable(); 1604 touch_emulator_->Enable(config_type);
1604 } else { 1605 } else {
1605 if (touch_emulator_) 1606 if (touch_emulator_)
1606 touch_emulator_->Disable(); 1607 touch_emulator_->Disable();
1607 } 1608 }
1608 } 1609 }
1609 1610
1610 void RenderWidgetHostImpl::OnTextInputTypeChanged( 1611 void RenderWidgetHostImpl::OnTextInputTypeChanged(
1611 ui::TextInputType type, 1612 ui::TextInputType type,
1612 ui::TextInputMode input_mode, 1613 ui::TextInputMode input_mode,
1613 bool can_compose_inline, 1614 bool can_compose_inline,
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 } 2165 }
2165 #endif 2166 #endif
2166 2167
2167 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2168 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2168 if (view_) 2169 if (view_)
2169 return view_->PreferredReadbackFormat(); 2170 return view_->PreferredReadbackFormat();
2170 return kN32_SkColorType; 2171 return kN32_SkColorType;
2171 } 2172 }
2172 2173
2173 } // namespace content 2174 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698