Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Side by Side Diff: content/browser/tab_contents/tab_contents_delegate.cc

Issue 8921032: Adds some debugging code in hopes of identifying a crasher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "content/browser/tab_contents/tab_contents.h" 11 #include "content/browser/tab_contents/tab_contents.h"
12 #include "content/public/browser/intents_host.h" 12 #include "content/public/browser/intents_host.h"
13 #include "content/public/browser/notification_service.h"
14 #include "content/public/browser/notification_types.h"
13 #include "content/public/common/url_constants.h" 15 #include "content/public/common/url_constants.h"
14 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
15 #include "webkit/glue/web_intent_data.h" 17 #include "webkit/glue/web_intent_data.h"
16 18
17 TabContentsDelegate::TabContentsDelegate() { 19 TabContentsDelegate::TabContentsDelegate() {
18 } 20 }
19 21
20 TabContents* TabContentsDelegate::OpenURLFromTab(TabContents* source, 22 TabContents* TabContentsDelegate::OpenURLFromTab(TabContents* source,
21 const OpenURLParams& params) { 23 const OpenURLParams& params) {
22 return NULL; 24 return NULL;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 332
331 void TabContentsDelegate::RequestToLockMouse(TabContents* tab) { 333 void TabContentsDelegate::RequestToLockMouse(TabContents* tab) {
332 } 334 }
333 335
334 TabContentsDelegate::~TabContentsDelegate() { 336 TabContentsDelegate::~TabContentsDelegate() {
335 while (!attached_contents_.empty()) { 337 while (!attached_contents_.empty()) {
336 TabContents* tab_contents = *attached_contents_.begin(); 338 TabContents* tab_contents = *attached_contents_.begin();
337 tab_contents->set_delegate(NULL); 339 tab_contents->set_delegate(NULL);
338 } 340 }
339 DCHECK(attached_contents_.empty()); 341 DCHECK(attached_contents_.empty());
342 content::NotificationService::current()->Notify(
343 content::NOTIFICATION_TAB_CONTENTS_DELEGATE_DESTROYED,
344 content::Source<TabContentsDelegate>(this),
345 content::NotificationService::NoDetails());
340 } 346 }
341 347
342 void TabContentsDelegate::Attach(TabContents* tab_contents) { 348 void TabContentsDelegate::Attach(TabContents* tab_contents) {
343 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); 349 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end());
344 attached_contents_.insert(tab_contents); 350 attached_contents_.insert(tab_contents);
345 } 351 }
346 352
347 void TabContentsDelegate::Detach(TabContents* tab_contents) { 353 void TabContentsDelegate::Detach(TabContents* tab_contents) {
348 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); 354 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end());
349 attached_contents_.erase(tab_contents); 355 attached_contents_.erase(tab_contents);
350 } 356 }
351 357
352 void TabContentsDelegate::LostMouseLock() { 358 void TabContentsDelegate::LostMouseLock() {
353 } 359 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/default_tab_drag_controller.cc ('k') | content/public/browser/notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698