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" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 bool WebContentsDelegate::ShouldCreateWebContents( | 113 bool WebContentsDelegate::ShouldCreateWebContents( |
114 WebContents* web_contents, | 114 WebContents* web_contents, |
115 int route_id, | 115 int route_id, |
116 WindowContainerType window_container_type, | 116 WindowContainerType window_container_type, |
117 const string16& frame_name, | 117 const string16& frame_name, |
118 const GURL& target_url) { | 118 const GURL& target_url) { |
119 return true; | 119 return true; |
120 } | 120 } |
121 | 121 |
122 #if defined(OS_ANDROID) | |
123 bool WebContentsDelegate::ShouldOverrideLoading(const GURL& url) { | |
124 return false; | |
125 } | |
126 #endif | |
127 | |
128 JavaScriptDialogCreator* WebContentsDelegate::GetJavaScriptDialogCreator() { | 122 JavaScriptDialogCreator* WebContentsDelegate::GetJavaScriptDialogCreator() { |
129 return NULL; | 123 return NULL; |
130 } | 124 } |
131 | 125 |
132 bool WebContentsDelegate::IsFullscreenForTabOrPending( | 126 bool WebContentsDelegate::IsFullscreenForTabOrPending( |
133 const WebContents* web_contents) const { | 127 const WebContents* web_contents) const { |
134 return false; | 128 return false; |
135 } | 129 } |
136 | 130 |
137 content::ColorChooser* WebContentsDelegate::OpenColorChooser( | 131 content::ColorChooser* WebContentsDelegate::OpenColorChooser( |
(...skipping 23 matching lines...) Expand all Loading... |
161 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); | 155 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); |
162 attached_contents_.insert(web_contents); | 156 attached_contents_.insert(web_contents); |
163 } | 157 } |
164 | 158 |
165 void WebContentsDelegate::Detach(WebContents* web_contents) { | 159 void WebContentsDelegate::Detach(WebContents* web_contents) { |
166 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); | 160 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); |
167 attached_contents_.erase(web_contents); | 161 attached_contents_.erase(web_contents); |
168 } | 162 } |
169 | 163 |
170 } // namespace content | 164 } // namespace content |
OLD | NEW |