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

Unified Diff: chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc

Issue 497843002: GuestViews should be able to specify task manager entries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc
diff --git a/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc b/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc
index c93001331dbc58c06b419d10e94d2c75dca533c6..7bf899c300268becffce204989d0aa60fa40f0e8 100644
--- a/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc
+++ b/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc
@@ -4,16 +4,28 @@
#include "chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
+#include "chrome/browser/task_manager/task_manager_util.h"
+#include "chrome/grit/generated_resources.h"
#include "components/renderer_context_menu/context_menu_delegate.h"
+#include "ui/base/l10n/l10n_util.h"
namespace extensions {
-ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate() {
+ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate(
+ extensions::AppViewGuest* app_view_guest)
+ : AppViewGuestDelegate(app_view_guest) {
}
ChromeAppViewGuestDelegate::~ChromeAppViewGuestDelegate() {
}
+base::string16 ChromeAppViewGuestDelegate::GetTaskName() const {
+ const int message_id = IDS_TASK_MANAGER_APPVIEW_TAG_PREFIX;
+ base::string16 title =
+ task_manager::util::GetTitleFromWebContents(guest_web_contents());
+ return l10n_util::GetStringFUTF16(message_id, title);
+}
+
bool ChromeAppViewGuestDelegate::HandleContextMenu(
content::WebContents* web_contents,
const content::ContextMenuParams& params) {

Powered by Google App Engine
This is Rietveld 408576698