OLD | NEW |
---|---|
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 Loading... | |
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() : false; |
Devlin
2015/08/04 16:05:07
drive-by: this would be cleaner as is_app = extens
afakhry
2015/08/04 18:31:08
Much better, really! Thanks! :)
Done.
| |
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 |
OLD | NEW |