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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 10421003: Remove a bunch of trivial render_view_host_delegate.h includes in chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/debugger/devtools_sanity_browsertest.cc » ('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) 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/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/cookies_tree_model.h" 21 #include "chrome/browser/cookies_tree_model.h"
22 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/render_messages.h" 25 #include "chrome/common/render_messages.h"
26 #include "content/public/browser/navigation_controller.h" 26 #include "content/public/browser/navigation_controller.h"
27 #include "content/public/browser/navigation_details.h" 27 #include "content/public/browser/navigation_details.h"
28 #include "content/public/browser/navigation_entry.h" 28 #include "content/public/browser/navigation_entry.h"
29 #include "content/public/browser/notification_service.h" 29 #include "content/public/browser/notification_service.h"
30 #include "content/public/browser/render_view_host.h" 30 #include "content/public/browser/render_view_host.h"
31 #include "content/public/browser/render_view_host_delegate.h"
32 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
33 #include "content/public/browser/web_contents_delegate.h" 32 #include "content/public/browser/web_contents_delegate.h"
34 #include "webkit/fileapi/file_system_types.h" 33 #include "webkit/fileapi/file_system_types.h"
35 34
36 using content::BrowserThread; 35 using content::BrowserThread;
37 using content::NavigationController; 36 using content::NavigationController;
38 using content::NavigationEntry; 37 using content::NavigationEntry;
39 using content::RenderViewHost; 38 using content::RenderViewHost;
40 using content::WebContents; 39 using content::WebContents;
41 40
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
81 RenderViewHost* view = RenderViewHost::FromID( 80 RenderViewHost* view = RenderViewHost::FromID(
82 render_process_id, render_view_id); 81 render_process_id, render_view_id);
83 if (!view) 82 if (!view)
84 return NULL; 83 return NULL;
85 // We loop through the tab contents and compare them with |view|, instead of 84 // We loop through the tab contents and compare them with |view|, instead of
86 // getting the RVH from each tab contents and comparing its IDs because the 85 // getting the RVH from each tab contents and comparing its IDs because the
87 // latter will miss provisional RenderViewHosts. 86 // latter will miss provisional RenderViewHosts.
88 for (TabSpecificList::iterator i = g_tab_specific.Get().begin(); 87 for (TabSpecificList::iterator i = g_tab_specific.Get().begin();
89 i != g_tab_specific.Get().end(); ++i) { 88 i != g_tab_specific.Get().end(); ++i) {
90 if (view->GetDelegate()->GetAsWebContents() == (*i)->web_contents()) 89 if (WebContents::FromRenderViewHost(view) == (*i)->web_contents())
91 return (*i); 90 return (*i);
92 } 91 }
93 92
94 return NULL; 93 return NULL;
95 } 94 }
96 95
97 // static 96 // static
98 void TabSpecificContentSettings::CookiesRead(int render_process_id, 97 void TabSpecificContentSettings::CookiesRead(int render_process_id,
99 int render_view_id, 98 int render_view_id,
100 const GURL& url, 99 const GURL& url,
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 512 }
514 513
515 void TabSpecificContentSettings::RemoveSiteDataObserver( 514 void TabSpecificContentSettings::RemoveSiteDataObserver(
516 SiteDataObserver* observer) { 515 SiteDataObserver* observer) {
517 observer_list_.RemoveObserver(observer); 516 observer_list_.RemoveObserver(observer);
518 } 517 }
519 518
520 void TabSpecificContentSettings::NotifySiteDataObservers() { 519 void TabSpecificContentSettings::NotifySiteDataObservers() {
521 FOR_EACH_OBSERVER(SiteDataObserver, observer_list_, OnSiteDataAccessed()); 520 FOR_EACH_OBSERVER(SiteDataObserver, observer_list_, OnSiteDataAccessed());
522 } 521 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/debugger/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698