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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 1630443002: [Merge M49] [TabManager] Protect tabs that are using camera/microphone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 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
« no previous file with comments | « chrome/browser/memory/tab_stats.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/webui/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 memory::TabStatsList stats = tab_manager->GetTabStats(); 515 memory::TabStatsList stats = tab_manager->GetTabStats();
516 std::vector<std::string> titles; 516 std::vector<std::string> titles;
517 titles.reserve(stats.size()); 517 titles.reserve(stats.size());
518 for (memory::TabStatsList::iterator it = stats.begin(); it != stats.end(); 518 for (memory::TabStatsList::iterator it = stats.begin(); it != stats.end();
519 ++it) { 519 ++it) {
520 std::string str; 520 std::string str;
521 str.reserve(4096); 521 str.reserve(4096);
522 str += "<b>"; 522 str += "<b>";
523 str += it->is_app ? "[App] " : ""; 523 str += it->is_app ? "[App] " : "";
524 str += it->is_internal_page ? "[Internal] " : ""; 524 str += it->is_internal_page ? "[Internal] " : "";
525 str += it->is_playing_audio ? "[Audio] " : ""; 525 str += it->is_media ? "[Media] " : "";
526 str += it->is_pinned ? "[Pinned] " : ""; 526 str += it->is_pinned ? "[Pinned] " : "";
527 str += it->is_discarded ? "[Discarded] " : ""; 527 str += it->is_discarded ? "[Discarded] " : "";
528 str += "</b>"; 528 str += "</b>";
529 str += net::EscapeForHTML(base::UTF16ToUTF8(it->title)); 529 str += net::EscapeForHTML(base::UTF16ToUTF8(it->title));
530 #if defined(OS_CHROMEOS) 530 #if defined(OS_CHROMEOS)
531 str += base::StringPrintf(" (%d) ", it->oom_score); 531 str += base::StringPrintf(" (%d) ", it->oom_score);
532 #endif 532 #endif
533 if (!it->is_discarded) { 533 if (!it->is_discarded) {
534 str += base::StringPrintf(" <a href='%s%s/%" PRId64 "'>Discard</a>", 534 str += base::StringPrintf(" <a href='%s%s/%" PRId64 "'>Discard</a>",
535 chrome::kChromeUIDiscardsURL, 535 chrome::kChromeUIDiscardsURL,
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 Profile* profile = Profile::FromWebUI(web_ui); 1036 Profile* profile = Profile::FromWebUI(web_ui);
1037 1037
1038 #if defined(ENABLE_THEMES) 1038 #if defined(ENABLE_THEMES)
1039 // Set up the chrome://theme/ source. 1039 // Set up the chrome://theme/ source.
1040 ThemeSource* theme = new ThemeSource(profile); 1040 ThemeSource* theme = new ThemeSource(profile);
1041 content::URLDataSource::Add(profile, theme); 1041 content::URLDataSource::Add(profile, theme);
1042 #endif 1042 #endif
1043 1043
1044 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1044 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1045 } 1045 }
OLDNEW
« no previous file with comments | « chrome/browser/memory/tab_stats.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698