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 WindowOpenDisposition disposition, |
| 32 bool is_content_initiated, |
| 33 content::PageTransition transition_type) { |
| 34 return false; |
| 35 } |
| 36 |
27 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { | 37 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { |
28 return false; | 38 return false; |
29 } | 39 } |
30 | 40 |
31 bool WebContentsDelegate::IsApplication() const { return false; } | 41 bool WebContentsDelegate::IsApplication() const { return false; } |
32 | 42 |
33 bool WebContentsDelegate::CanReloadContents(WebContents* source) const { | 43 bool WebContentsDelegate::CanReloadContents(WebContents* source) const { |
34 return true; | 44 return true; |
35 } | 45 } |
36 | 46 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); | 172 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); |
163 attached_contents_.insert(web_contents); | 173 attached_contents_.insert(web_contents); |
164 } | 174 } |
165 | 175 |
166 void WebContentsDelegate::Detach(WebContents* web_contents) { | 176 void WebContentsDelegate::Detach(WebContents* web_contents) { |
167 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); | 177 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); |
168 attached_contents_.erase(web_contents); | 178 attached_contents_.erase(web_contents); |
169 } | 179 } |
170 | 180 |
171 } // namespace content | 181 } // namespace content |
OLD | NEW |