| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 bool WebContentsDelegate::TakeFocus(WebContents* source, bool reverse) { | 64 bool WebContentsDelegate::TakeFocus(WebContents* source, bool reverse) { |
| 65 return false; | 65 return false; |
| 66 } | 66 } |
| 67 | 67 |
| 68 int WebContentsDelegate::GetExtraRenderViewHeight() const { | 68 int WebContentsDelegate::GetExtraRenderViewHeight() const { |
| 69 return 0; | 69 return 0; |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool WebContentsDelegate::CanDownload(RenderViewHost* render_view_host, | 72 bool WebContentsDelegate::CanDownload(RenderViewHost* render_view_host, |
| 73 int request_id, | 73 int request_id, |
| 74 const std::string& request_method) { | 74 const std::string& request_method, |
| 75 bool has_auth) { |
| 75 return true; | 76 return true; |
| 76 } | 77 } |
| 77 | 78 |
| 78 bool WebContentsDelegate::HandleContextMenu( | 79 bool WebContentsDelegate::HandleContextMenu( |
| 79 const content::ContextMenuParams& params) { | 80 const content::ContextMenuParams& params) { |
| 80 return false; | 81 return false; |
| 81 } | 82 } |
| 82 | 83 |
| 83 void WebContentsDelegate::ViewSourceForTab(WebContents* source, | 84 void WebContentsDelegate::ViewSourceForTab(WebContents* source, |
| 84 const GURL& page_url) { | 85 const GURL& page_url) { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); | 160 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); |
| 160 attached_contents_.insert(web_contents); | 161 attached_contents_.insert(web_contents); |
| 161 } | 162 } |
| 162 | 163 |
| 163 void WebContentsDelegate::Detach(WebContents* web_contents) { | 164 void WebContentsDelegate::Detach(WebContents* web_contents) { |
| 164 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); | 165 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); |
| 165 attached_contents_.erase(web_contents); | 166 attached_contents_.erase(web_contents); |
| 166 } | 167 } |
| 167 | 168 |
| 168 } // namespace content | 169 } // namespace content |
| OLD | NEW |