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

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: Rebased; storing config type Created 5 years, 11 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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 void RenderWidgetHostImpl::OnBlur() { 1580 void RenderWidgetHostImpl::OnBlur() {
1581 // Only RenderViewHost can deal with that message. 1581 // Only RenderViewHost can deal with that message.
1582 RecordAction(base::UserMetricsAction("BadMessageTerminate_RWH5")); 1582 RecordAction(base::UserMetricsAction("BadMessageTerminate_RWH5"));
1583 GetProcess()->ReceivedBadMessage(); 1583 GetProcess()->ReceivedBadMessage();
1584 } 1584 }
1585 1585
1586 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { 1586 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) {
1587 SetCursor(cursor); 1587 SetCursor(cursor);
1588 } 1588 }
1589 1589
1590 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled(bool enabled) { 1590 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled(
1591 bool enabled, ui::GestureProviderConfigType config_type) {
1591 if (enabled) { 1592 if (enabled) {
1592 if (!touch_emulator_) 1593 if (!touch_emulator_)
1593 touch_emulator_.reset(new TouchEmulator(this)); 1594 touch_emulator_.reset(new TouchEmulator(this));
1594 touch_emulator_->Enable(); 1595 touch_emulator_->Enable(config_type);
1595 } else { 1596 } else {
1596 if (touch_emulator_) 1597 if (touch_emulator_)
1597 touch_emulator_->Disable(); 1598 touch_emulator_->Disable();
1598 } 1599 }
1599 } 1600 }
1600 1601
1601 void RenderWidgetHostImpl::OnTextInputTypeChanged( 1602 void RenderWidgetHostImpl::OnTextInputTypeChanged(
1602 ui::TextInputType type, 1603 ui::TextInputType type,
1603 ui::TextInputMode input_mode, 1604 ui::TextInputMode input_mode,
1604 bool can_compose_inline, 1605 bool can_compose_inline,
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 } 2160 }
2160 #endif 2161 #endif
2161 2162
2162 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2163 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2163 if (view_) 2164 if (view_)
2164 return view_->PreferredReadbackFormat(); 2165 return view_->PreferredReadbackFormat();
2165 return kN32_SkColorType; 2166 return kN32_SkColorType;
2166 } 2167 }
2167 2168
2168 } // namespace content 2169 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698