summaryrefslogtreecommitdiffstats
path: root/webkit/glue/window_open_disposition.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:33:47 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:33:47 +0000
commitcf13bb696f6a50b06930ed8fabb0984cd6af7be9 (patch)
treea883217d4a1eee49750954f851188c5ca6fa6308 /webkit/glue/window_open_disposition.cc
parent05158051ea881677c03a22ddf38a3e6779cebb9e (diff)
downloadchromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.zip
chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.gz
chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.bz2
Reverting 20854.
Review URL: http://codereview.chromium.org/155621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/window_open_disposition.cc')
-rw-r--r--webkit/glue/window_open_disposition.cc43
1 files changed, 0 insertions, 43 deletions
diff --git a/webkit/glue/window_open_disposition.cc b/webkit/glue/window_open_disposition.cc
deleted file mode 100644
index 417ab1a..0000000
--- a/webkit/glue/window_open_disposition.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/glue/window_open_disposition.h"
-
-#include "base/logging.h"
-
-// The macro dance here allows us to only express the mapping once.
-#define MAPPINGS(MAP) \
- MAP(WebNavigationPolicyIgnore, IGNORE_ACTION) \
- MAP(WebNavigationPolicyDownload, SAVE_TO_DISK) \
- MAP(WebNavigationPolicyCurrentTab, CURRENT_TAB) \
- MAP(WebNavigationPolicyNewBackgroundTab, NEW_BACKGROUND_TAB) \
- MAP(WebNavigationPolicyNewForegroundTab, NEW_FOREGROUND_TAB) \
- MAP(WebNavigationPolicyNewWindow, NEW_WINDOW) \
- MAP(WebNavigationPolicyNewPopup, NEW_POPUP)
-
-#define POLICY_TO_DISPOSITION(policy, disposition) \
- case WebKit::policy: return disposition;
-
-WindowOpenDisposition NavigationPolicyToDisposition(
- WebKit::WebNavigationPolicy policy) {
- switch (policy) {
- MAPPINGS(POLICY_TO_DISPOSITION)
- default:
- NOTREACHED() << "Unexpected WebNavigationPolicy";
- return IGNORE_ACTION;
- }
-}
-
-#define DISPOSITION_TO_POLICY(policy, disposition) \
- case disposition: return WebKit::policy;
-
-WebKit::WebNavigationPolicy DispositionToNavigationPolicy(
- WindowOpenDisposition disposition) {
- switch (disposition) {
- MAPPINGS(DISPOSITION_TO_POLICY)
- default:
- NOTREACHED() << "Unexpected WindowOpenDisposition";
- return WebKit::WebNavigationPolicyIgnore;
- }
-}