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

Side by Side Diff: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Non-Mac compile. Created 4 years, 4 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 | chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h » ('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 (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 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat e.h" 5 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat e.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/devtools/devtools_window.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 - (void)touchesCancelledWithEvent:(NSEvent*)event { 77 - (void)touchesCancelledWithEvent:(NSEvent*)event {
78 [historySwiper_ touchesCancelledWithEvent:event]; 78 [historySwiper_ touchesCancelledWithEvent:event];
79 } 79 }
80 80
81 - (void)touchesEndedWithEvent:(NSEvent*)event { 81 - (void)touchesEndedWithEvent:(NSEvent*)event {
82 [historySwiper_ touchesEndedWithEvent:event]; 82 [historySwiper_ touchesEndedWithEvent:event];
83 } 83 }
84 84
85 - (BOOL)canRubberbandLeft:(NSView*)view {
86 return [historySwiper_ canRubberbandLeft:view];
87 }
88
89 - (BOOL)canRubberbandRight:(NSView*)view {
90 return [historySwiper_ canRubberbandRight:view];
91 }
92
93 // HistorySwiperDelegate methods 85 // HistorySwiperDelegate methods
94 86
95 - (BOOL)shouldAllowHistorySwiping { 87 - (BOOL)shouldAllowHistorySwiping {
96 if (!renderWidgetHost_) 88 if (!renderWidgetHost_)
97 return NO; 89 return NO;
98 RenderViewHost* renderViewHost = RenderViewHost::From(renderWidgetHost_); 90 RenderViewHost* renderViewHost = RenderViewHost::From(renderWidgetHost_);
99 if (!renderViewHost) 91 if (!renderViewHost)
100 return NO; 92 return NO;
101 content::WebContents* webContents = 93 content::WebContents* webContents =
102 content::WebContents::FromRenderViewHost(renderViewHost); 94 content::WebContents::FromRenderViewHost(renderViewHost);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 196 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
205 DCHECK(profile); 197 DCHECK(profile);
206 PrefService* pref = profile->GetPrefs(); 198 PrefService* pref = profile->GetPrefs();
207 pref->SetBoolean(prefs::kEnableContinuousSpellcheck, 199 pref->SetBoolean(prefs::kEnableContinuousSpellcheck,
208 !pref->GetBoolean(prefs::kEnableContinuousSpellcheck)); 200 !pref->GetBoolean(prefs::kEnableContinuousSpellcheck));
209 } 201 }
210 202
211 // END Spellchecking methods 203 // END Spellchecking methods
212 204
213 @end 205 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698