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

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

Issue 313083002: Disable overscroll navigation when emulating touch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 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 | Annotate | Revision Log
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 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 RecordAction(base::UserMetricsAction("BadMessageTerminate_RWH5")); 1604 RecordAction(base::UserMetricsAction("BadMessageTerminate_RWH5"));
1605 GetProcess()->ReceivedBadMessage(); 1605 GetProcess()->ReceivedBadMessage();
1606 } 1606 }
1607 1607
1608 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { 1608 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) {
1609 SetCursor(cursor); 1609 SetCursor(cursor);
1610 } 1610 }
1611 1611
1612 void RenderWidgetHostImpl::OnSetTouchEventEmulationEnabled( 1612 void RenderWidgetHostImpl::OnSetTouchEventEmulationEnabled(
1613 bool enabled, bool allow_pinch) { 1613 bool enabled, bool allow_pinch) {
1614 if (delegate_)
1615 delegate_->OnTouchEmulationEnabled(enabled);
1616
1614 if (enabled) { 1617 if (enabled) {
1615 if (!touch_emulator_) 1618 if (!touch_emulator_)
1616 touch_emulator_.reset(new TouchEmulator(this)); 1619 touch_emulator_.reset(new TouchEmulator(this));
1617 touch_emulator_->Enable(allow_pinch); 1620 touch_emulator_->Enable(allow_pinch);
1618 } else { 1621 } else {
1619 if (touch_emulator_) 1622 if (touch_emulator_)
1620 touch_emulator_->Disable(); 1623 touch_emulator_->Disable();
1621 } 1624 }
1622 } 1625 }
1623 1626
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 } 2307 }
2305 } 2308 }
2306 2309
2307 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2310 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() {
2308 if (view_) 2311 if (view_)
2309 return view_->PreferredReadbackFormat(); 2312 return view_->PreferredReadbackFormat();
2310 return SkBitmap::kARGB_8888_Config; 2313 return SkBitmap::kARGB_8888_Config;
2311 } 2314 }
2312 2315
2313 } // namespace content 2316 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_delegate.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698