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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 155241: Roll WebKit to r45634 and fix build (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « DEPS ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 1486
1487 DCHECK(disposition); 1487 DCHECK(disposition);
1488 if (new_tab_modifier) 1488 if (new_tab_modifier)
1489 *disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 1489 *disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
1490 else 1490 else
1491 *disposition = shift ? NEW_WINDOW : SAVE_TO_DISK; 1491 *disposition = shift ? NEW_WINDOW : SAVE_TO_DISK;
1492 return true; 1492 return true;
1493 } 1493 }
1494 1494
1495 NavigationGesture WebFrameLoaderClient::NavigationGestureForLastLoad() { 1495 NavigationGesture WebFrameLoaderClient::NavigationGestureForLastLoad() {
1496 // TODO(timsteele): userGestureHint returns too many false positives 1496 // TODO(timsteele): isProcessingUserGesture() returns too many false positives
1497 // (see bug 1051891) to trust it and assign NavigationGestureUser, so 1497 // (see bug 1051891) to trust it and assign NavigationGestureUser, so
1498 // for now we assign Unknown in those cases and Auto otherwise. 1498 // for now we assign Unknown in those cases and Auto otherwise.
1499 // (Issue 874811 known false negative as well). 1499 // (Issue 874811 known false negative as well).
1500 return webframe_->frame()->loader()->userGestureHint() ? 1500 return webframe_->frame()->loader()->isProcessingUserGesture() ?
1501 NavigationGestureUnknown : 1501 NavigationGestureUnknown :
1502 NavigationGestureAuto; 1502 NavigationGestureAuto;
1503 } 1503 }
1504 1504
1505 void WebFrameLoaderClient::HandleBackForwardNavigation(const GURL& url) { 1505 void WebFrameLoaderClient::HandleBackForwardNavigation(const GURL& url) {
1506 DCHECK(url.SchemeIs(webkit_glue::kBackForwardNavigationScheme)); 1506 DCHECK(url.SchemeIs(webkit_glue::kBackForwardNavigationScheme));
1507 1507
1508 std::string offset_str = url.ExtractFileName(); 1508 std::string offset_str = url.ExtractFileName();
1509 int offset; 1509 int offset;
1510 if (!StringToInt(offset_str, &offset)) 1510 if (!StringToInt(offset_str, &offset))
1511 return; 1511 return;
1512 1512
1513 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); 1513 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
1514 if (d) 1514 if (d)
1515 d->NavigateBackForwardSoon(offset); 1515 d->NavigateBackForwardSoon(offset);
1516 } 1516 }
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698