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

Side by Side Diff: chrome/browser/task_manager/task_manager_browsertest_util.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: Added DEPS 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 (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_browsertest_util.h" 5 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/test/test_timeouts.h" 12 #include "base/test/test_timeouts.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/task_manager/resource_provider.h" 16 #include "chrome/browser/task_manager/resource_provider.h"
17 #include "chrome/browser/task_manager/task_manager.h" 17 #include "chrome/browser/task_manager/task_manager.h"
18 #include "chrome/grit/generated_resources.h" 18 #include "chrome/grit/generated_resources.h"
19 #include "extensions/strings/grit/extensions_strings.h"
19 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
20 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
21 22
22 namespace task_manager { 23 namespace task_manager {
23 namespace browsertest_util { 24 namespace browsertest_util {
24 25
25 namespace { 26 namespace {
26 27
27 class ResourceChangeObserver : public TaskManagerModelObserver { 28 class ResourceChangeObserver : public TaskManagerModelObserver {
28 public: 29 public:
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 base::string16 MatchAnyExtension() { return MatchExtension("*"); } 164 base::string16 MatchAnyExtension() { return MatchExtension("*"); }
164 165
165 base::string16 MatchApp(const char* title) { 166 base::string16 MatchApp(const char* title) {
166 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_APP_PREFIX, 167 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_APP_PREFIX,
167 base::ASCIIToUTF16(title)); 168 base::ASCIIToUTF16(title));
168 } 169 }
169 170
170 base::string16 MatchAnyApp() { return MatchApp("*"); } 171 base::string16 MatchAnyApp() { return MatchApp("*"); }
171 172
172 base::string16 MatchWebView(const char* title) { 173 base::string16 MatchWebView(const char* title) {
173 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_WEBVIEW_TAG_PREFIX, 174 return l10n_util::GetStringFUTF16(
174 base::ASCIIToUTF16(title)); 175 IDS_EXTENSION_TASK_MANAGER_WEBVIEW_TAG_PREFIX,
176 base::ASCIIToUTF16(title));
175 } 177 }
176 178
177 base::string16 MatchAnyWebView() { return MatchWebView("*"); } 179 base::string16 MatchAnyWebView() { return MatchWebView("*"); }
178 180
179 base::string16 MatchBackground(const char* title) { 181 base::string16 MatchBackground(const char* title) {
180 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_BACKGROUND_PREFIX, 182 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_BACKGROUND_PREFIX,
181 base::ASCIIToUTF16(title)); 183 base::ASCIIToUTF16(title));
182 } 184 }
183 185
184 base::string16 MatchAnyBackground() { return MatchBackground("*"); } 186 base::string16 MatchAnyBackground() { return MatchBackground("*"); }
185 187
186 base::string16 MatchPrint(const char* title) { 188 base::string16 MatchPrint(const char* title) {
187 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_PRINT_PREFIX, 189 return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_PRINT_PREFIX,
188 base::ASCIIToUTF16(title)); 190 base::ASCIIToUTF16(title));
189 } 191 }
190 192
191 base::string16 MatchAnyPrint() { return MatchPrint("*"); } 193 base::string16 MatchAnyPrint() { return MatchPrint("*"); }
192 194
193 } // namespace browsertest_util 195 } // namespace browsertest_util
194 } // namespace task_manager 196 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/guest_information.cc ('k') | extensions/browser/guest_view/app_view/app_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698