OLD | NEW |
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" |
11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
12 #include "content/public/browser/web_intents_dispatcher.h" | 12 #include "content/public/browser/web_intents_dispatcher.h" |
13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 #include "webkit/glue/web_intent_data.h" | 15 #include "webkit/glue/web_intent_data.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 WebContentsDelegate::WebContentsDelegate() { | 19 WebContentsDelegate::WebContentsDelegate() { |
20 } | 20 } |
21 | 21 |
22 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, | 22 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, |
23 const OpenURLParams& params) { | 23 const OpenURLParams& params) { |
24 return NULL; | 24 return NULL; |
25 } | 25 } |
26 | 26 |
| 27 bool WebContentsDelegate::ShouldIgnoreNavigation( |
| 28 WebContents* source, |
| 29 const GURL& url, |
| 30 const content::Referrer& referrer, |
| 31 bool is_content_initiated) { |
| 32 return false; |
| 33 } |
| 34 |
27 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { | 35 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { |
28 return false; | 36 return false; |
29 } | 37 } |
30 | 38 |
31 bool WebContentsDelegate::IsApplication() const { return false; } | 39 bool WebContentsDelegate::IsApplication() const { return false; } |
32 | 40 |
33 bool WebContentsDelegate::CanLoadDataURLsInWebUI() const { return false; } | 41 bool WebContentsDelegate::CanLoadDataURLsInWebUI() const { return false; } |
34 | 42 |
35 bool WebContentsDelegate::CanReloadContents(WebContents* source) const { | 43 bool WebContentsDelegate::CanReloadContents(WebContents* source) const { |
36 return true; | 44 return true; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); | 173 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); |
166 attached_contents_.insert(web_contents); | 174 attached_contents_.insert(web_contents); |
167 } | 175 } |
168 | 176 |
169 void WebContentsDelegate::Detach(WebContents* web_contents) { | 177 void WebContentsDelegate::Detach(WebContents* web_contents) { |
170 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); | 178 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); |
171 attached_contents_.erase(web_contents); | 179 attached_contents_.erase(web_contents); |
172 } | 180 } |
173 | 181 |
174 } // namespace content | 182 } // namespace content |
OLD | NEW |