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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 return; | 723 return; |
724 } | 724 } |
725 | 725 |
726 if (tab_tracker_->ContainsHandle(tab_handle)) { | 726 if (tab_tracker_->ContainsHandle(tab_handle)) { |
727 NavigationController* tab = tab_tracker_->GetResource(tab_handle); | 727 NavigationController* tab = tab_tracker_->GetResource(tab_handle); |
728 DCHECK(tab != NULL); | 728 DCHECK(tab != NULL); |
729 if (tab && tab->tab_contents()) { | 729 if (tab && tab->tab_contents()) { |
730 DCHECK(tab->tab_contents()->GetBrowserContext() != NULL); | 730 DCHECK(tab->tab_contents()->GetBrowserContext() != NULL); |
731 Profile* profile = | 731 Profile* profile = |
732 Profile::FromBrowserContext(tab->tab_contents()->GetBrowserContext()); | 732 Profile::FromBrowserContext(tab->tab_contents()->GetBrowserContext()); |
733 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); | 733 profile->GetPrefs()->SetInteger( |
| 734 prefs::kWebKitGlobalDefaultFontSize, font_size); |
734 } | 735 } |
735 } | 736 } |
736 } | 737 } |
737 | 738 |
738 void AutomationProvider::RemoveBrowsingData(int remove_mask) { | 739 void AutomationProvider::RemoveBrowsingData(int remove_mask) { |
739 BrowsingDataRemover* remover; | 740 BrowsingDataRemover* remover; |
740 remover = new BrowsingDataRemover(profile(), | 741 remover = new BrowsingDataRemover(profile(), |
741 BrowsingDataRemover::EVERYTHING, // All time periods. | 742 BrowsingDataRemover::EVERYTHING, // All time periods. |
742 base::Time()); | 743 base::Time()); |
743 remover->Remove(remove_mask); | 744 remover->Remove(remove_mask); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 } | 1001 } |
1001 } | 1002 } |
1002 } | 1003 } |
1003 | 1004 |
1004 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1005 void AutomationProvider::SaveAsAsync(int tab_handle) { |
1005 NavigationController* tab = NULL; | 1006 NavigationController* tab = NULL; |
1006 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 1007 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
1007 if (web_contents) | 1008 if (web_contents) |
1008 web_contents->OnSavePage(); | 1009 web_contents->OnSavePage(); |
1009 } | 1010 } |
OLD | NEW |