OLD | NEW |
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/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 return; | 722 return; |
723 } | 723 } |
724 | 724 |
725 if (tab_tracker_->ContainsHandle(tab_handle)) { | 725 if (tab_tracker_->ContainsHandle(tab_handle)) { |
726 NavigationController* tab = tab_tracker_->GetResource(tab_handle); | 726 NavigationController* tab = tab_tracker_->GetResource(tab_handle); |
727 DCHECK(tab != NULL); | 727 DCHECK(tab != NULL); |
728 if (tab && tab->tab_contents()) { | 728 if (tab && tab->tab_contents()) { |
729 DCHECK(tab->tab_contents()->browser_context() != NULL); | 729 DCHECK(tab->tab_contents()->browser_context() != NULL); |
730 Profile* profile = | 730 Profile* profile = |
731 Profile::FromBrowserContext(tab->tab_contents()->browser_context()); | 731 Profile::FromBrowserContext(tab->tab_contents()->browser_context()); |
732 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); | 732 profile->GetPrefs()->SetInteger( |
| 733 prefs::kWebKitGlobalDefaultFontSize, font_size); |
733 } | 734 } |
734 } | 735 } |
735 } | 736 } |
736 | 737 |
737 void AutomationProvider::RemoveBrowsingData(int remove_mask) { | 738 void AutomationProvider::RemoveBrowsingData(int remove_mask) { |
738 BrowsingDataRemover* remover; | 739 BrowsingDataRemover* remover; |
739 remover = new BrowsingDataRemover(profile(), | 740 remover = new BrowsingDataRemover(profile(), |
740 BrowsingDataRemover::EVERYTHING, // All time periods. | 741 BrowsingDataRemover::EVERYTHING, // All time periods. |
741 base::Time()); | 742 base::Time()); |
742 remover->Remove(remove_mask); | 743 remover->Remove(remove_mask); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 } | 1000 } |
1000 } | 1001 } |
1001 } | 1002 } |
1002 | 1003 |
1003 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1004 void AutomationProvider::SaveAsAsync(int tab_handle) { |
1004 NavigationController* tab = NULL; | 1005 NavigationController* tab = NULL; |
1005 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1006 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
1006 if (tab_contents) | 1007 if (tab_contents) |
1007 tab_contents->OnSavePage(); | 1008 tab_contents->OnSavePage(); |
1008 } | 1009 } |
OLD | NEW |