| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/tab_contents/tab_contents_delegate.h" | 5 #include "content/browser/tab_contents/tab_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/browser/javascript_dialogs.h" | 10 #include "content/browser/javascript_dialogs.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const gfx::Rect& pos) { | 65 const gfx::Rect& pos) { |
| 66 } | 66 } |
| 67 | 67 |
| 68 void TabContentsDelegate::DetachContents(TabContents* source) { | 68 void TabContentsDelegate::DetachContents(TabContents* source) { |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool TabContentsDelegate::IsPopupOrPanel(const TabContents* source) const { | 71 bool TabContentsDelegate::IsPopupOrPanel(const TabContents* source) const { |
| 72 return false; | 72 return false; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool TabContentsDelegate::ShouldFocusConstrainedWindow() { | |
| 76 return true; | |
| 77 } | |
| 78 | |
| 79 void TabContentsDelegate::WillShowConstrainedWindow(TabContents* source) { | |
| 80 } | |
| 81 | |
| 82 void TabContentsDelegate::UpdateTargetURL(TabContents* source, | 75 void TabContentsDelegate::UpdateTargetURL(TabContents* source, |
| 83 int32 page_id, | 76 int32 page_id, |
| 84 const GURL& url) { | 77 const GURL& url) { |
| 85 } | 78 } |
| 86 | 79 |
| 87 void TabContentsDelegate::ContentsMouseEvent( | 80 void TabContentsDelegate::ContentsMouseEvent( |
| 88 TabContents* source, const gfx::Point& location, bool motion) { | 81 TabContents* source, const gfx::Point& location, bool motion) { |
| 89 } | 82 } |
| 90 | 83 |
| 91 void TabContentsDelegate::ContentsZoomChange(bool zoom_in) { } | 84 void TabContentsDelegate::ContentsZoomChange(bool zoom_in) { } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 119 | 112 |
| 120 void TabContentsDelegate::RenderWidgetShowing() {} | 113 void TabContentsDelegate::RenderWidgetShowing() {} |
| 121 | 114 |
| 122 bool TabContentsDelegate::TakeFocus(bool reverse) { | 115 bool TabContentsDelegate::TakeFocus(bool reverse) { |
| 123 return false; | 116 return false; |
| 124 } | 117 } |
| 125 | 118 |
| 126 void TabContentsDelegate::LostCapture() { | 119 void TabContentsDelegate::LostCapture() { |
| 127 } | 120 } |
| 128 | 121 |
| 129 void TabContentsDelegate::SetTabContentBlocked( | |
| 130 TabContents* contents, bool blocked) { | |
| 131 } | |
| 132 | |
| 133 void TabContentsDelegate::TabContentsFocused(TabContents* tab_content) { | 122 void TabContentsDelegate::TabContentsFocused(TabContents* tab_content) { |
| 134 } | 123 } |
| 135 | 124 |
| 136 int TabContentsDelegate::GetExtraRenderViewHeight() const { | 125 int TabContentsDelegate::GetExtraRenderViewHeight() const { |
| 137 return 0; | 126 return 0; |
| 138 } | 127 } |
| 139 | 128 |
| 140 bool TabContentsDelegate::CanDownload(TabContents* source, int request_id) { | 129 bool TabContentsDelegate::CanDownload(TabContents* source, int request_id) { |
| 141 return true; | 130 return true; |
| 142 } | 131 } |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 332 |
| 344 void TabContentsDelegate::Attach(TabContents* tab_contents) { | 333 void TabContentsDelegate::Attach(TabContents* tab_contents) { |
| 345 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); | 334 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); |
| 346 attached_contents_.insert(tab_contents); | 335 attached_contents_.insert(tab_contents); |
| 347 } | 336 } |
| 348 | 337 |
| 349 void TabContentsDelegate::Detach(TabContents* tab_contents) { | 338 void TabContentsDelegate::Detach(TabContents* tab_contents) { |
| 350 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); | 339 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); |
| 351 attached_contents_.erase(tab_contents); | 340 attached_contents_.erase(tab_contents); |
| 352 } | 341 } |
| OLD | NEW |