| 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/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 int WebContentsDelegate::GetExtraRenderViewHeight() const { | 58 int WebContentsDelegate::GetExtraRenderViewHeight() const { |
| 59 return 0; | 59 return 0; |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool WebContentsDelegate::CanDownload(WebContents* source, int request_id) { | 62 bool WebContentsDelegate::CanDownload(WebContents* source, int request_id) { |
| 63 return true; | 63 return true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool WebContentsDelegate::HandleContextMenu(const ContextMenuParams& params) { | 66 bool WebContentsDelegate::HandleContextMenu( |
| 67 const content::ContextMenuParams& params) { |
| 67 return false; | 68 return false; |
| 68 } | 69 } |
| 69 | 70 |
| 70 bool WebContentsDelegate::ExecuteContextMenuCommand(int command) { | 71 bool WebContentsDelegate::ExecuteContextMenuCommand(int command) { |
| 71 return false; | 72 return false; |
| 72 } | 73 } |
| 73 | 74 |
| 74 void WebContentsDelegate::ViewSourceForTab(WebContents* source, | 75 void WebContentsDelegate::ViewSourceForTab(WebContents* source, |
| 75 const GURL& page_url) { | 76 const GURL& page_url) { |
| 76 // Fall back implementation based entirely on the view-source scheme. | 77 // Fall back implementation based entirely on the view-source scheme. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); | 151 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); |
| 151 attached_contents_.insert(web_contents); | 152 attached_contents_.insert(web_contents); |
| 152 } | 153 } |
| 153 | 154 |
| 154 void WebContentsDelegate::Detach(WebContents* web_contents) { | 155 void WebContentsDelegate::Detach(WebContents* web_contents) { |
| 155 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); | 156 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); |
| 156 attached_contents_.erase(web_contents); | 157 attached_contents_.erase(web_contents); |
| 157 } | 158 } |
| 158 | 159 |
| 159 } // namespace content | 160 } // namespace content |
| OLD | NEW |