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

Unified Diff: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm

Issue 9307001: [Mac] More tweaks to the Lion gesture UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/history_overlay_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
index 7ff3264747558de7cfad6ba15de90b260b82e0d8..de426fea2824f5f6a0d580ce362174371db5c881 100644
--- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
+++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
@@ -255,22 +255,26 @@ class SpellCheckRenderViewObserver : public content::RenderViewHostObserver {
return;
}
+ BOOL ended = phase == NSEventPhaseEnded;
+
+ // Dismiss the panel before navigation for immediate visual feedback.
+ [historyOverlay setProgress:gestureAmount];
+ if (ended)
+ [historyOverlay dismiss];
+
// |gestureAmount| obeys -[NSEvent isDirectionInvertedFromDevice]
// automatically.
Browser* browser = BrowserList::FindBrowserWithWindow(
historyOverlay.view.window);
- if (phase == NSEventPhaseEnded && browser) {
+ if (ended && browser) {
if (goForward)
browser->GoForward(CURRENT_TAB);
else
browser->GoBack(CURRENT_TAB);
}
- [historyOverlay setProgress:gestureAmount];
- if (isComplete) {
- [historyOverlay dismiss];
+ if (isComplete)
[historyOverlay release];
- }
}];
return YES;
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/history_overlay_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698