Chromium Code Reviews| Index: content/renderer/render_view_impl.cc |
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
| index 37d1011dc930132ba83deb303b2f85c65398c999..8b10ecbcaeee9b13d1c3a89cc19c2ad3cc7bcbe0 100644 |
| --- a/content/renderer/render_view_impl.cc |
| +++ b/content/renderer/render_view_impl.cc |
| @@ -146,6 +146,7 @@ |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| @@ -339,6 +340,33 @@ using WebKit::WebFloatRect; |
| using WebKit::WebHitTestResult; |
| #endif |
| +namespace { |
|
jam
2013/01/08 16:32:32
nit: in general, all code in content should be in
tfarina
2013/01/08 20:42:18
Done.
|
| + |
| +WindowOpenDisposition NavigationPolicyToDisposition( |
| + WebKit::WebNavigationPolicy policy) { |
| + switch (policy) { |
| + case WebKit::WebNavigationPolicyIgnore: |
| + return IGNORE_ACTION; |
| + case WebKit::WebNavigationPolicyDownload: |
| + return SAVE_TO_DISK; |
| + case WebKit::WebNavigationPolicyCurrentTab: |
| + return CURRENT_TAB; |
| + case WebKit::WebNavigationPolicyNewBackgroundTab: |
| + return NEW_BACKGROUND_TAB; |
| + case WebKit::WebNavigationPolicyNewForegroundTab: |
| + return NEW_FOREGROUND_TAB; |
| + case WebKit::WebNavigationPolicyNewWindow: |
| + return NEW_WINDOW; |
| + case WebKit::WebNavigationPolicyNewPopup: |
| + return NEW_POPUP; |
| + default: |
| + NOTREACHED() << "Unexpected WebNavigationPolicy"; |
| + return IGNORE_ACTION; |
| + } |
| +} |
| + |
| +} // namespace |
| + |
| namespace content { |
| //----------------------------------------------------------------------------- |