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

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

Issue 138913021: Avoid discarding freshly created background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (last_selected) Created 6 years, 10 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 #ifndef CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 struct TabStats { 72 struct TabStats {
73 TabStats(); 73 TabStats();
74 ~TabStats(); 74 ~TabStats();
75 bool is_app; // browser window is an app 75 bool is_app; // browser window is an app
76 bool is_reloadable_ui; // Reloadable web UI page, like NTP or Settings. 76 bool is_reloadable_ui; // Reloadable web UI page, like NTP or Settings.
77 bool is_playing_audio; 77 bool is_playing_audio;
78 bool is_pinned; 78 bool is_pinned;
79 bool is_selected; // selected in the currently active browser window 79 bool is_selected; // selected in the currently active browser window
80 bool is_discarded; 80 bool is_discarded;
81 base::TimeTicks last_selected; 81 base::TimeTicks last_active;
82 base::ProcessHandle renderer_handle; 82 base::ProcessHandle renderer_handle;
83 base::string16 title; 83 base::string16 title;
84 int64 tab_contents_id; // unique ID per WebContents 84 int64 tab_contents_id; // unique ID per WebContents
85 }; 85 };
86 typedef std::vector<TabStats> TabStatsList; 86 typedef std::vector<TabStats> TabStatsList;
87 87
88 // Returns true if the |url| represents an internal Chrome web UI page that 88 // Returns true if the |url| represents an internal Chrome web UI page that
89 // can be easily reloaded and hence makes a good choice to discard. 89 // can be easily reloaded and hence makes a good choice to discard.
90 static bool IsReloadableUI(const GURL& url); 90 static bool IsReloadableUI(const GURL& url);
91 91
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Whether a tab discard event has occurred during the last time interval, 163 // Whether a tab discard event has occurred during the last time interval,
164 // used for statistics normalized by usage. 164 // used for statistics normalized by usage.
165 bool recent_tab_discard_; 165 bool recent_tab_discard_;
166 166
167 DISALLOW_COPY_AND_ASSIGN(OomPriorityManager); 167 DISALLOW_COPY_AND_ASSIGN(OomPriorityManager);
168 }; 168 };
169 169
170 } // namespace chromeos 170 } // namespace chromeos
171 171
172 #endif // CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_ 172 #endif // CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/dev_tools_server.cc ('k') | chrome/browser/chromeos/memory/oom_priority_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698