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 "chrome/browser/task_manager/task_manager_resource_providers.h" | 5 #include "chrome/browser/task_manager/task_manager_resource_providers.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 break; | 695 break; |
696 } | 696 } |
697 } | 697 } |
698 break; | 698 break; |
699 } | 699 } |
700 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: | 700 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: |
701 { | 701 { |
702 for (PanelResourceMap::iterator iter = resources_.begin(); | 702 for (PanelResourceMap::iterator iter = resources_.begin(); |
703 iter != resources_.end(); ++iter) { | 703 iter != resources_.end(); ++iter) { |
704 Panel* panel = iter->first; | 704 Panel* panel = iter->first; |
705 if (panel->GetWebContents() == web_contents) { | 705 if (!panel->GetWebContents()) { |
706 Remove(panel); | 706 Remove(panel); |
707 break; | 707 break; |
708 } | 708 } |
709 } | 709 } |
710 break; | 710 break; |
711 } | 711 } |
712 default: | 712 default: |
713 NOTREACHED() << "Unexpected notificiation."; | 713 NOTREACHED() << "Unexpected notificiation."; |
714 break; | 714 break; |
715 } | 715 } |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 | 1683 |
1684 return &resource_; | 1684 return &resource_; |
1685 } | 1685 } |
1686 | 1686 |
1687 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1687 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
1688 task_manager_->AddResource(&resource_); | 1688 task_manager_->AddResource(&resource_); |
1689 } | 1689 } |
1690 | 1690 |
1691 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1691 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
1692 } | 1692 } |
OLD | NEW |