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

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

Issue 42054: Stop using renderer specific host ids in ResourceDispatcher. This allows it ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/web_contents.h" 5 #include "chrome/browser/tab_contents/web_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 void WebContents::DisassociateFromPopupCount() { 431 void WebContents::DisassociateFromPopupCount() {
432 render_view_host()->DisassociateFromPopupCount(); 432 render_view_host()->DisassociateFromPopupCount();
433 } 433 }
434 434
435 void WebContents::DidBecomeSelected() { 435 void WebContents::DidBecomeSelected() {
436 TabContents::DidBecomeSelected(); 436 TabContents::DidBecomeSelected();
437 437
438 if (render_widget_host_view()) 438 if (render_widget_host_view())
439 render_widget_host_view()->DidBecomeSelected(); 439 render_widget_host_view()->DidBecomeSelected();
440 440
441 CacheManagerHost::GetInstance()->ObserveActivity(process()->host_id()); 441 // If pid() is -1, that means the RenderProcessHost still hasn't been
442 // initialized. It'll register with CacheManagerHost when it is.
443 if (process()->pid() != -1)
444 CacheManagerHost::GetInstance()->ObserveActivity(process()->pid());
442 } 445 }
443 446
444 void WebContents::WasHidden() { 447 void WebContents::WasHidden() {
445 if (!capturing_contents()) { 448 if (!capturing_contents()) {
446 // |render_view_host()| can be NULL if the user middle clicks a link to open 449 // |render_view_host()| can be NULL if the user middle clicks a link to open
447 // a tab in then background, then closes the tab before selecting it. This 450 // a tab in then background, then closes the tab before selecting it. This
448 // is because closing the tab calls WebContents::Destroy(), which removes 451 // is because closing the tab calls WebContents::Destroy(), which removes
449 // the |render_view_host()|; then when we actually destroy the window, 452 // the |render_view_host()|; then when we actually destroy the window,
450 // OnWindowPosChanged() notices and calls HideContents() (which calls us). 453 // OnWindowPosChanged() notices and calls HideContents() (which calls us).
451 if (render_widget_host_view()) 454 if (render_widget_host_view())
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 // The favicon url isn't valid. This means there really isn't a favicon, 1854 // The favicon url isn't valid. This means there really isn't a favicon,
1852 // or the favicon url wasn't obtained before the load started. This assumes 1855 // or the favicon url wasn't obtained before the load started. This assumes
1853 // the later. 1856 // the later.
1854 // TODO(sky): Need a way to set the favicon that doesn't involve generating 1857 // TODO(sky): Need a way to set the favicon that doesn't involve generating
1855 // its url. 1858 // its url.
1856 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); 1859 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer));
1857 } 1860 }
1858 new_url->set_safe_for_autoreplace(true); 1861 new_url->set_safe_for_autoreplace(true);
1859 url_model->Add(new_url); 1862 url_model->Add(new_url);
1860 } 1863 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/site_instance.cc ('k') | chrome/browser/tab_contents/web_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698