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

Side by Side Diff: chrome/browser/ui/browser_back_forward_navigator.cc

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make event_utils::DispositionFromEventFlags not view-specific. Created 9 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/browser_back_forward_navigator.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h"
9 #include "chrome/browser/ui/event_disposition_utils.h"
10 #include "webkit/glue/window_open_disposition.h"
11
12 namespace browser {
13
14 // static
15 void BrowserBackForwardNavigator::GoBack(
16 TabContentsWrapperDelegate* delegate, int flags)
17 {
18 WindowOpenDisposition disposition =
19 event_utils::DispositionFromEventFlags(flags);
20 delegate->GoBack(disposition);
21 }
22
23 // static
24 void BrowserBackForwardNavigator::GoForward(
25 TabContentsWrapperDelegate* delegate, int flags)
26 {
27 WindowOpenDisposition disposition =
28 event_utils::DispositionFromEventFlags(flags);
29 delegate->GoForward(disposition);
30 }
31
32 // static
33 void BrowserBackForwardNavigator::NavigateToIndex(
34 TabContentsWrapperDelegate* delegate, int index, int flags)
35 {
36 WindowOpenDisposition disposition =
37 event_utils::DispositionFromEventFlags(flags);
38
39 if (!delegate->NavigateToIndexWithDisposition(index, disposition))
40 NOTREACHED();
41 }
42
43 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698