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

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

Issue 8956050: Rename TabContents::controller() to GetController and put it into the WebContents interface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 457 }
458 } 458 }
459 459
460 void TabSpecificContentSettings::Observe( 460 void TabSpecificContentSettings::Observe(
461 int type, 461 int type,
462 const content::NotificationSource& source, 462 const content::NotificationSource& source,
463 const content::NotificationDetails& details) { 463 const content::NotificationDetails& details) {
464 DCHECK(type == chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED); 464 DCHECK(type == chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED);
465 465
466 content::Details<const ContentSettingsDetails> settings_details(details); 466 content::Details<const ContentSettingsDetails> settings_details(details);
467 const NavigationController& controller = tab_contents()->controller(); 467 const NavigationController& controller = tab_contents()->GetController();
468 NavigationEntry* entry = controller.GetActiveEntry(); 468 NavigationEntry* entry = controller.GetActiveEntry();
469 GURL entry_url; 469 GURL entry_url;
470 if (entry) 470 if (entry)
471 entry_url = entry->url(); 471 entry_url = entry->url();
472 if (settings_details.ptr()->update_all() || 472 if (settings_details.ptr()->update_all() ||
473 // The active NavigationEntry is the URL in the URL field of a tab. 473 // The active NavigationEntry is the URL in the URL field of a tab.
474 // Currently this should be matched by the |primary_pattern|. 474 // Currently this should be matched by the |primary_pattern|.
475 settings_details.ptr()->primary_pattern().Matches(entry_url)) { 475 settings_details.ptr()->primary_pattern().Matches(entry_url)) {
476 Profile* profile = 476 Profile* profile =
477 Profile::FromBrowserContext(tab_contents()->browser_context()); 477 Profile::FromBrowserContext(tab_contents()->browser_context());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 return new CookiesTreeModel(cookies_->Clone(), 512 return new CookiesTreeModel(cookies_->Clone(),
513 databases_->Clone(), 513 databases_->Clone(),
514 local_storages_->Clone(), 514 local_storages_->Clone(),
515 session_storages_->Clone(), 515 session_storages_->Clone(),
516 appcaches_->Clone(), 516 appcaches_->Clone(),
517 indexed_dbs_->Clone(), 517 indexed_dbs_->Clone(),
518 file_systems_->Clone(), 518 file_systems_->Clone(),
519 NULL, 519 NULL,
520 true); 520 true);
521 } 521 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/notifications/balloon_view.cc ('k') | chrome/browser/crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698