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

Side by Side Diff: chrome/browser/task_management/providers/web_contents/panel_task.cc

Issue 1254103002: New Task Manager - Phase 1.3.5: Implement Extension Task Providing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Devlin's comments Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_management/providers/web_contents/panel_task.h" 5 #include "chrome/browser/task_management/providers/web_contents/panel_task.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/panels/panel.h" 9 #include "chrome/browser/ui/panels/panel.h"
10 #include "extensions/browser/extension_registry.h" 10 #include "extensions/browser/extension_registry.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 base::string16 PanelTask::GetCurrentPanelTitle(Panel* panel) const { 47 base::string16 PanelTask::GetCurrentPanelTitle(Panel* panel) const {
48 base::string16 title = panel->GetWindowTitle(); 48 base::string16 title = panel->GetWindowTitle();
49 base::i18n::AdjustStringForLocaleDirection(&title); 49 base::i18n::AdjustStringForLocaleDirection(&title);
50 50
51 extensions::ExtensionRegistry* registry = 51 extensions::ExtensionRegistry* registry =
52 extensions::ExtensionRegistry::Get(panel->profile()); 52 extensions::ExtensionRegistry::Get(panel->profile());
53 const extensions::Extension* extension = 53 const extensions::Extension* extension =
54 registry->enabled_extensions().GetByID(panel->extension_id()); 54 registry->enabled_extensions().GetByID(panel->extension_id());
55 55
56 const bool is_app = extension ? extension->is_app() : false; 56 const bool is_app = extension && extension->is_app();
57 const bool is_incognito = panel->profile()->IsOffTheRecord(); 57 const bool is_incognito = panel->profile()->IsOffTheRecord();
58 58
59 return PrefixRendererTitle(title, 59 return PrefixRendererTitle(title,
60 is_app, 60 is_app,
61 true, // is_extension. 61 true, // is_extension.
62 is_incognito); 62 is_incognito,
63 false); // is_background.
63 } 64 }
64 65
65 } // namespace task_management 66 } // namespace task_management
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698