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

Side by Side Diff: content/public/browser/web_contents_delegate.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/browser/web_contents_delegate.h" 5 #include "content/public/browser/web_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 const content::ContextMenuParams& params) { 89 const content::ContextMenuParams& params) {
90 return false; 90 return false;
91 } 91 }
92 92
93 void WebContentsDelegate::ViewSourceForTab(WebContents* source, 93 void WebContentsDelegate::ViewSourceForTab(WebContents* source,
94 const GURL& page_url) { 94 const GURL& page_url) {
95 // Fall back implementation based entirely on the view-source scheme. 95 // Fall back implementation based entirely on the view-source scheme.
96 // It suffers from http://crbug.com/523 and that is why browser overrides 96 // It suffers from http://crbug.com/523 and that is why browser overrides
97 // it with proper implementation. 97 // it with proper implementation.
98 GURL url = GURL(kViewSourceScheme + std::string(":") + page_url.spec()); 98 GURL url = GURL(kViewSourceScheme + std::string(":") + page_url.spec());
99 OpenURLFromTab(source, OpenURLParams(url, Referrer(), 99 OpenURLFromTab(
100 NEW_FOREGROUND_TAB, 100 source,
101 ui::PAGE_TRANSITION_LINK, false)); 101 OpenURLParams(url, Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
102 ui::PAGE_TRANSITION_LINK, false));
102 } 103 }
103 104
104 void WebContentsDelegate::ViewSourceForFrame(WebContents* source, 105 void WebContentsDelegate::ViewSourceForFrame(WebContents* source,
105 const GURL& frame_url, 106 const GURL& frame_url,
106 const PageState& page_state) { 107 const PageState& page_state) {
107 // Same as ViewSourceForTab, but for given subframe. 108 // Same as ViewSourceForTab, but for given subframe.
108 GURL url = GURL(kViewSourceScheme + std::string(":") + frame_url.spec()); 109 GURL url = GURL(kViewSourceScheme + std::string(":") + frame_url.spec());
109 OpenURLFromTab(source, OpenURLParams(url, Referrer(), 110 OpenURLFromTab(
110 NEW_FOREGROUND_TAB, 111 source,
111 ui::PAGE_TRANSITION_LINK, false)); 112 OpenURLParams(url, Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
113 ui::PAGE_TRANSITION_LINK, false));
112 } 114 }
113 115
114 bool WebContentsDelegate::PreHandleKeyboardEvent( 116 bool WebContentsDelegate::PreHandleKeyboardEvent(
115 WebContents* source, 117 WebContents* source,
116 const NativeWebKeyboardEvent& event, 118 const NativeWebKeyboardEvent& event,
117 bool* is_keyboard_shortcut) { 119 bool* is_keyboard_shortcut) {
118 return false; 120 return false;
119 } 121 }
120 122
121 bool WebContentsDelegate::PreHandleGestureEvent( 123 bool WebContentsDelegate::PreHandleGestureEvent(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void WebContentsDelegate::ShowCertificateViewerInDevTools( 257 void WebContentsDelegate::ShowCertificateViewerInDevTools(
256 WebContents* web_contents, 258 WebContents* web_contents,
257 int cert_id) { 259 int cert_id) {
258 } 260 }
259 261
260 void WebContentsDelegate::RequestAppBannerFromDevTools( 262 void WebContentsDelegate::RequestAppBannerFromDevTools(
261 content::WebContents* web_contents) { 263 content::WebContents* web_contents) {
262 } 264 }
263 265
264 } // namespace content 266 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/page_navigator.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698