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

Side by Side Diff: Source/core/page/Page.cpp

Issue 15179002: Remove code that is unused after ContextMenu cleanup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove canHandleRequest code from DRT Created 7 years, 7 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 | « Source/core/page/Page.h ('k') | Source/core/page/Settings.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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 { 272 {
273 HistoryItem* item = backForward()->forwardItem(); 273 HistoryItem* item = backForward()->forwardItem();
274 274
275 if (item) { 275 if (item) {
276 goToItem(item); 276 goToItem(item);
277 return true; 277 return true;
278 } 278 }
279 return false; 279 return false;
280 } 280 }
281 281
282 bool Page::canGoBackOrForward(int distance) const
283 {
284 if (distance == 0)
285 return true;
286 if (distance > 0 && distance <= backForward()->forwardCount())
287 return true;
288 if (distance < 0 && -distance <= backForward()->backCount())
289 return true;
290 return false;
291 }
292
293 void Page::goBackOrForward(int distance) 282 void Page::goBackOrForward(int distance)
294 { 283 {
295 if (distance == 0) 284 if (distance == 0)
296 return; 285 return;
297 286
298 HistoryItem* item = backForward()->itemAtIndex(distance); 287 HistoryItem* item = backForward()->itemAtIndex(distance);
299 if (!item) { 288 if (!item) {
300 if (distance > 0) { 289 if (distance > 0) {
301 if (int forwardCount = backForward()->forwardCount()) 290 if (int forwardCount = backForward()->forwardCount())
302 item = backForward()->itemAtIndex(forwardCount); 291 item = backForward()->itemAtIndex(forwardCount);
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 , dragClient(0) 827 , dragClient(0)
839 , inspectorClient(0) 828 , inspectorClient(0)
840 { 829 {
841 } 830 }
842 831
843 Page::PageClients::~PageClients() 832 Page::PageClients::~PageClients()
844 { 833 {
845 } 834 }
846 835
847 } // namespace WebCore 836 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698