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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 72 } |
73 | 73 |
74 bool TabContentsDelegate::ShouldFocusConstrainedWindow() { | 74 bool TabContentsDelegate::ShouldFocusConstrainedWindow() { |
75 return true; | 75 return true; |
76 } | 76 } |
77 | 77 |
78 void TabContentsDelegate::WillShowConstrainedWindow(TabContents* source) { | 78 void TabContentsDelegate::WillShowConstrainedWindow(TabContents* source) { |
79 } | 79 } |
80 | 80 |
81 void TabContentsDelegate::UpdateTargetURL(TabContents* source, | 81 void TabContentsDelegate::UpdateTargetURL(TabContents* source, |
| 82 int32 page_id, |
82 const GURL& url) { | 83 const GURL& url) { |
83 } | 84 } |
84 | 85 |
85 void TabContentsDelegate::ContentsMouseEvent( | 86 void TabContentsDelegate::ContentsMouseEvent( |
86 TabContents* source, const gfx::Point& location, bool motion) { | 87 TabContents* source, const gfx::Point& location, bool motion) { |
87 } | 88 } |
88 | 89 |
89 void TabContentsDelegate::ContentsZoomChange(bool zoom_in) { } | 90 void TabContentsDelegate::ContentsZoomChange(bool zoom_in) { } |
90 | 91 |
91 bool TabContentsDelegate::IsApplication() const { return false; } | 92 bool TabContentsDelegate::IsApplication() const { return false; } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } | 318 } |
318 | 319 |
319 void TabContentsDelegate::FindReply(TabContents* tab, | 320 void TabContentsDelegate::FindReply(TabContents* tab, |
320 int request_id, | 321 int request_id, |
321 int number_of_matches, | 322 int number_of_matches, |
322 const gfx::Rect& selection_rect, | 323 const gfx::Rect& selection_rect, |
323 int active_match_ordinal, | 324 int active_match_ordinal, |
324 bool final_update) { | 325 bool final_update) { |
325 } | 326 } |
326 | 327 |
| 328 void TabContentsDelegate::CrashedPlugin(TabContents* tab, |
| 329 const FilePath& plugin_path) { |
| 330 } |
| 331 |
327 TabContentsDelegate::~TabContentsDelegate() { | 332 TabContentsDelegate::~TabContentsDelegate() { |
328 while (!attached_contents_.empty()) { | 333 while (!attached_contents_.empty()) { |
329 TabContents* tab_contents = *attached_contents_.begin(); | 334 TabContents* tab_contents = *attached_contents_.begin(); |
330 tab_contents->set_delegate(NULL); | 335 tab_contents->set_delegate(NULL); |
331 } | 336 } |
332 DCHECK(attached_contents_.empty()); | 337 DCHECK(attached_contents_.empty()); |
333 } | 338 } |
334 | 339 |
335 void TabContentsDelegate::Attach(TabContents* tab_contents) { | 340 void TabContentsDelegate::Attach(TabContents* tab_contents) { |
336 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); | 341 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); |
337 attached_contents_.insert(tab_contents); | 342 attached_contents_.insert(tab_contents); |
338 } | 343 } |
339 | 344 |
340 void TabContentsDelegate::Detach(TabContents* tab_contents) { | 345 void TabContentsDelegate::Detach(TabContents* tab_contents) { |
341 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); | 346 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); |
342 attached_contents_.erase(tab_contents); | 347 attached_contents_.erase(tab_contents); |
343 } | 348 } |
OLD | NEW |