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

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

Issue 2775553002: Adds the ability for WebContentsDelegate to decide if event should be updated (Closed)
Patch Set: Fix compile Created 3 years, 9 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"
11 #include "content/public/browser/keyboard_event_processing_result.h"
11 #include "content/public/browser/render_view_host.h" 12 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/security_style_explanations.h" 13 #include "content/public/browser/security_style_explanations.h"
13 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
14 #include "content/public/common/bindings_policy.h" 15 #include "content/public/common/bindings_policy.h"
15 #include "content/public/common/url_constants.h" 16 #include "content/public/common/url_constants.h"
16 #include "net/cert/x509_certificate.h" 17 #include "net/cert/x509_certificate.h"
17 #include "ui/gfx/geometry/rect.h" 18 #include "ui/gfx/geometry/rect.h"
18 19
19 namespace content { 20 namespace content {
20 21
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const GURL& frame_url, 105 const GURL& frame_url,
105 const PageState& page_state) { 106 const PageState& page_state) {
106 // Same as ViewSourceForTab, but for given subframe. 107 // Same as ViewSourceForTab, but for given subframe.
107 GURL url = GURL(kViewSourceScheme + std::string(":") + frame_url.spec()); 108 GURL url = GURL(kViewSourceScheme + std::string(":") + frame_url.spec());
108 OpenURLFromTab( 109 OpenURLFromTab(
109 source, 110 source,
110 OpenURLParams(url, Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, 111 OpenURLParams(url, Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
111 ui::PAGE_TRANSITION_LINK, false)); 112 ui::PAGE_TRANSITION_LINK, false));
112 } 113 }
113 114
114 bool WebContentsDelegate::PreHandleKeyboardEvent( 115 KeyboardEventProcessingResult WebContentsDelegate::PreHandleKeyboardEvent(
115 WebContents* source, 116 WebContents* source,
116 const NativeWebKeyboardEvent& event, 117 const NativeWebKeyboardEvent& event) {
117 bool* is_keyboard_shortcut) { 118 return KeyboardEventProcessingResult::NOT_HANDLED;
118 return false;
119 } 119 }
120 120
121 bool WebContentsDelegate::PreHandleGestureEvent( 121 bool WebContentsDelegate::PreHandleGestureEvent(
122 WebContents* source, 122 WebContents* source,
123 const blink::WebGestureEvent& event) { 123 const blink::WebGestureEvent& event) {
124 return false; 124 return false;
125 } 125 }
126 126
127 bool WebContentsDelegate::CanDragEnter( 127 bool WebContentsDelegate::CanDragEnter(
128 WebContents* source, 128 WebContents* source,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 bool WebContentsDelegate::ShouldAllowRunningInsecureContent( 281 bool WebContentsDelegate::ShouldAllowRunningInsecureContent(
282 WebContents* web_contents, 282 WebContents* web_contents,
283 bool allowed_per_prefs, 283 bool allowed_per_prefs,
284 const url::Origin& origin, 284 const url::Origin& origin,
285 const GURL& resource_url) { 285 const GURL& resource_url) {
286 return allowed_per_prefs; 286 return allowed_per_prefs;
287 } 287 }
288 288
289 } // namespace content 289 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | extensions/browser/app_window/app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698