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

Side by Side Diff: chrome/browser/chromeos/memory/oom_priority_manager.cc

Issue 19869003: ChromeOS changes for GetURL refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing failing tests. Created 7 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 | Annotate | Revision Log
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/chromeos/memory/oom_priority_manager.h" 5 #include "chrome/browser/chromeos/memory/oom_priority_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 browser_iterator != ash_browser_list->end_last_active(); 560 browser_iterator != ash_browser_list->end_last_active();
561 ++browser_iterator) { 561 ++browser_iterator) {
562 Browser* browser = *browser_iterator; 562 Browser* browser = *browser_iterator;
563 bool is_browser_for_app = browser->is_app(); 563 bool is_browser_for_app = browser->is_app();
564 const TabStripModel* model = browser->tab_strip_model(); 564 const TabStripModel* model = browser->tab_strip_model();
565 for (int i = 0; i < model->count(); i++) { 565 for (int i = 0; i < model->count(); i++) {
566 WebContents* contents = model->GetWebContentsAt(i); 566 WebContents* contents = model->GetWebContentsAt(i);
567 if (!contents->IsCrashed()) { 567 if (!contents->IsCrashed()) {
568 TabStats stats; 568 TabStats stats;
569 stats.is_app = is_browser_for_app; 569 stats.is_app = is_browser_for_app;
570 stats.is_reloadable_ui = IsReloadableUI(contents->GetURL()); 570 stats.is_reloadable_ui =
571 IsReloadableUI(contents->GetLastCommittedURL());
571 stats.is_playing_audio = chrome::IsPlayingAudio(contents); 572 stats.is_playing_audio = chrome::IsPlayingAudio(contents);
572 stats.is_pinned = model->IsTabPinned(i); 573 stats.is_pinned = model->IsTabPinned(i);
573 stats.is_selected = browser_active && model->IsTabSelected(i); 574 stats.is_selected = browser_active && model->IsTabSelected(i);
574 stats.is_discarded = model->IsTabDiscarded(i); 575 stats.is_discarded = model->IsTabDiscarded(i);
575 stats.last_selected = contents->GetLastSelectedTime(); 576 stats.last_selected = contents->GetLastSelectedTime();
576 stats.renderer_handle = contents->GetRenderProcessHost()->GetHandle(); 577 stats.renderer_handle = contents->GetRenderProcessHost()->GetHandle();
577 stats.title = contents->GetTitle(); 578 stats.title = contents->GetTitle();
578 stats.tab_contents_id = IdFromWebContents(contents); 579 stats.tab_contents_id = IdFromWebContents(contents);
579 stats_list.push_back(stats); 580 stats_list.push_back(stats);
580 } 581 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 } 638 }
638 } 639 }
639 } 640 }
640 641
641 void OomPriorityManager::OnMemoryLow() { 642 void OomPriorityManager::OnMemoryLow() {
642 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 643 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
643 LogMemoryAndDiscardTab(); 644 LogMemoryAndDiscardTab();
644 } 645 }
645 646
646 } // namespace chromeos 647 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/media/media_player.cc ('k') | chrome/browser/chromeos/offline/offline_load_page_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698