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

Side by Side 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: More cleanup Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/guest_view/app_view/chrome_app_view_guest_delegate.h" 5 #include "chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h"
6 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 6 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
7 #include "chrome/browser/task_manager/task_manager_util.h"
8 #include "chrome/grit/generated_resources.h"
7 #include "components/renderer_context_menu/context_menu_delegate.h" 9 #include "components/renderer_context_menu/context_menu_delegate.h"
8 10
9 namespace extensions { 11 namespace extensions {
10 12
11 ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate() { 13 ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate(
14 extensions::AppViewGuest* app_view_guest)
15 : AppViewGuestDelegate(app_view_guest) {
12 } 16 }
13 17
14 ChromeAppViewGuestDelegate::~ChromeAppViewGuestDelegate() { 18 ChromeAppViewGuestDelegate::~ChromeAppViewGuestDelegate() {
15 } 19 }
16 20
21 int ChromeAppViewGuestDelegate::GetTaskPrefix() const {
22 return IDS_TASK_MANAGER_APPVIEW_TAG_PREFIX;
23 }
24
17 bool ChromeAppViewGuestDelegate::HandleContextMenu( 25 bool ChromeAppViewGuestDelegate::HandleContextMenu(
18 content::WebContents* web_contents, 26 content::WebContents* web_contents,
19 const content::ContextMenuParams& params) { 27 const content::ContextMenuParams& params) {
20 ContextMenuDelegate* menu_delegate = 28 ContextMenuDelegate* menu_delegate =
21 ContextMenuDelegate::FromWebContents(web_contents); 29 ContextMenuDelegate::FromWebContents(web_contents);
22 DCHECK(menu_delegate); 30 DCHECK(menu_delegate);
23 31
24 scoped_ptr<RenderViewContextMenu> menu = 32 scoped_ptr<RenderViewContextMenu> menu =
25 menu_delegate->BuildMenu(web_contents, params); 33 menu_delegate->BuildMenu(web_contents, params);
26 menu_delegate->ShowMenu(menu.Pass()); 34 menu_delegate->ShowMenu(menu.Pass());
27 return true; 35 return true;
28 } 36 }
29 37
30 } // namespace extensions 38 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698