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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 void WebContentsDelegate::ViewSourceForTab(WebContents* source, 87 void WebContentsDelegate::ViewSourceForTab(WebContents* source,
88 const GURL& page_url) { 88 const GURL& page_url) {
89 // Fall back implementation based entirely on the view-source scheme. 89 // Fall back implementation based entirely on the view-source scheme.
90 // It suffers from http://crbug.com/523 and that is why browser overrides 90 // It suffers from http://crbug.com/523 and that is why browser overrides
91 // it with proper implementation. 91 // it with proper implementation.
92 GURL url = GURL(kViewSourceScheme + std::string(":") + page_url.spec()); 92 GURL url = GURL(kViewSourceScheme + std::string(":") + page_url.spec());
93 OpenURLFromTab(source, OpenURLParams(url, Referrer(), 93 OpenURLFromTab(source, OpenURLParams(url, Referrer(),
94 NEW_FOREGROUND_TAB, 94 NEW_FOREGROUND_TAB,
95 PAGE_TRANSITION_LINK, false)); 95 ui::PAGE_TRANSITION_LINK, false));
96 } 96 }
97 97
98 void WebContentsDelegate::ViewSourceForFrame(WebContents* source, 98 void WebContentsDelegate::ViewSourceForFrame(WebContents* source,
99 const GURL& frame_url, 99 const GURL& frame_url,
100 const PageState& page_state) { 100 const PageState& page_state) {
101 // Same as ViewSourceForTab, but for given subframe. 101 // Same as ViewSourceForTab, but for given subframe.
102 GURL url = GURL(kViewSourceScheme + std::string(":") + frame_url.spec()); 102 GURL url = GURL(kViewSourceScheme + std::string(":") + frame_url.spec());
103 OpenURLFromTab(source, OpenURLParams(url, Referrer(), 103 OpenURLFromTab(source, OpenURLParams(url, Referrer(),
104 NEW_FOREGROUND_TAB, 104 NEW_FOREGROUND_TAB,
105 PAGE_TRANSITION_LINK, false)); 105 ui::PAGE_TRANSITION_LINK, false));
106 } 106 }
107 107
108 bool WebContentsDelegate::PreHandleKeyboardEvent( 108 bool WebContentsDelegate::PreHandleKeyboardEvent(
109 WebContents* source, 109 WebContents* source,
110 const NativeWebKeyboardEvent& event, 110 const NativeWebKeyboardEvent& event,
111 bool* is_keyboard_shortcut) { 111 bool* is_keyboard_shortcut) {
112 return false; 112 return false;
113 } 113 }
114 114
115 bool WebContentsDelegate::PreHandleGestureEvent( 115 bool WebContentsDelegate::PreHandleGestureEvent(
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 gfx::Size WebContentsDelegate::GetSizeForNewRenderView( 207 gfx::Size WebContentsDelegate::GetSizeForNewRenderView(
208 WebContents* web_contents) const { 208 WebContents* web_contents) const {
209 return gfx::Size(); 209 return gfx::Size();
210 } 210 }
211 211
212 bool WebContentsDelegate::IsNeverVisible(WebContents* web_contents) { 212 bool WebContentsDelegate::IsNeverVisible(WebContents* web_contents) {
213 return false; 213 return false;
214 } 214 }
215 215
216 } // namespace content 216 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698