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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 3235007: This adds periodic OOM score adjustment, based on the last access time (Closed)
Patch Set: Final review changes Created 10 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/zygote_host_linux.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 controller_.SetActive(true); 782 controller_.SetActive(true);
783 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); 783 RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
784 if (rwhv) { 784 if (rwhv) {
785 rwhv->DidBecomeSelected(); 785 rwhv->DidBecomeSelected();
786 #if defined(OS_MACOSX) 786 #if defined(OS_MACOSX)
787 rwhv->SetActive(true); 787 rwhv->SetActive(true);
788 #endif 788 #endif
789 } 789 }
790 790
791 WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id()); 791 WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id());
792 last_selected_time_ = base::TimeTicks::Now();
792 } 793 }
793 794
794 void TabContents::WasHidden() { 795 void TabContents::WasHidden() {
795 if (!capturing_contents()) { 796 if (!capturing_contents()) {
796 // |render_view_host()| can be NULL if the user middle clicks a link to open 797 // |render_view_host()| can be NULL if the user middle clicks a link to open
797 // a tab in then background, then closes the tab before selecting it. This 798 // a tab in then background, then closes the tab before selecting it. This
798 // is because closing the tab calls TabContents::Destroy(), which removes 799 // is because closing the tab calls TabContents::Destroy(), which removes
799 // the |render_view_host()|; then when we actually destroy the window, 800 // the |render_view_host()|; then when we actually destroy the window,
800 // OnWindowPosChanged() notices and calls HideContents() (which calls us). 801 // OnWindowPosChanged() notices and calls HideContents() (which calls us).
801 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); 802 RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3246 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3246 } 3247 }
3247 3248
3248 Profile* TabContents::GetProfileForPasswordManager() { 3249 Profile* TabContents::GetProfileForPasswordManager() {
3249 return profile(); 3250 return profile();
3250 } 3251 }
3251 3252
3252 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3253 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3253 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3254 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3254 } 3255 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/zygote_host_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698