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 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 | 1716 |
1717 TaskManagerGuestResource::~TaskManagerGuestResource() { | 1717 TaskManagerGuestResource::~TaskManagerGuestResource() { |
1718 } | 1718 } |
1719 | 1719 |
1720 TaskManager::Resource::Type TaskManagerGuestResource::GetType() const { | 1720 TaskManager::Resource::Type TaskManagerGuestResource::GetType() const { |
1721 return GUEST; | 1721 return GUEST; |
1722 } | 1722 } |
1723 | 1723 |
1724 string16 TaskManagerGuestResource::GetTitle() const { | 1724 string16 TaskManagerGuestResource::GetTitle() const { |
1725 WebContents* web_contents = GetWebContents(); | 1725 WebContents* web_contents = GetWebContents(); |
1726 const int message_id = IDS_TASK_MANAGER_BROWSER_TAG_PREFIX; | 1726 const int message_id = IDS_TASK_MANAGER_WEBVIEW_TAG_PREFIX; |
1727 if (web_contents) { | 1727 if (web_contents) { |
1728 string16 title = GetTitleFromWebContents(web_contents); | 1728 string16 title = GetTitleFromWebContents(web_contents); |
1729 return l10n_util::GetStringFUTF16(message_id, title); | 1729 return l10n_util::GetStringFUTF16(message_id, title); |
1730 } | 1730 } |
1731 return l10n_util::GetStringFUTF16(message_id, string16()); | 1731 return l10n_util::GetStringFUTF16(message_id, string16()); |
1732 } | 1732 } |
1733 | 1733 |
1734 string16 TaskManagerGuestResource::GetProfileName() const { | 1734 string16 TaskManagerGuestResource::GetProfileName() const { |
1735 WebContents* web_contents = GetWebContents(); | 1735 WebContents* web_contents = GetWebContents(); |
1736 if (web_contents) { | 1736 if (web_contents) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1870 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: | 1870 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: |
1871 Add(web_contents->GetRenderViewHost()); | 1871 Add(web_contents->GetRenderViewHost()); |
1872 break; | 1872 break; |
1873 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: | 1873 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: |
1874 Remove(web_contents->GetRenderViewHost()); | 1874 Remove(web_contents->GetRenderViewHost()); |
1875 break; | 1875 break; |
1876 default: | 1876 default: |
1877 NOTREACHED() << "Unexpected notification."; | 1877 NOTREACHED() << "Unexpected notification."; |
1878 } | 1878 } |
1879 } | 1879 } |
OLD | NEW |