| 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 return; | 719 return; |
| 720 } | 720 } |
| 721 | 721 |
| 722 if (tab_tracker_->ContainsHandle(tab_handle)) { | 722 if (tab_tracker_->ContainsHandle(tab_handle)) { |
| 723 NavigationController* tab = tab_tracker_->GetResource(tab_handle); | 723 NavigationController* tab = tab_tracker_->GetResource(tab_handle); |
| 724 DCHECK(tab != NULL); | 724 DCHECK(tab != NULL); |
| 725 if (tab && tab->tab_contents()) { | 725 if (tab && tab->tab_contents()) { |
| 726 DCHECK(tab->tab_contents()->browser_context() != NULL); | 726 DCHECK(tab->tab_contents()->browser_context() != NULL); |
| 727 Profile* profile = | 727 Profile* profile = |
| 728 Profile::FromBrowserContext(tab->tab_contents()->browser_context()); | 728 Profile::FromBrowserContext(tab->tab_contents()->browser_context()); |
| 729 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); | 729 profile->GetPrefs()->SetInteger( |
| 730 prefs::kWebKitGlobalDefaultFontSize, font_size); |
| 730 } | 731 } |
| 731 } | 732 } |
| 732 } | 733 } |
| 733 | 734 |
| 734 void AutomationProvider::RemoveBrowsingData(int remove_mask) { | 735 void AutomationProvider::RemoveBrowsingData(int remove_mask) { |
| 735 BrowsingDataRemover* remover; | 736 BrowsingDataRemover* remover; |
| 736 remover = new BrowsingDataRemover(profile(), | 737 remover = new BrowsingDataRemover(profile(), |
| 737 BrowsingDataRemover::EVERYTHING, // All time periods. | 738 BrowsingDataRemover::EVERYTHING, // All time periods. |
| 738 base::Time()); | 739 base::Time()); |
| 739 remover->Remove(remove_mask); | 740 remover->Remove(remove_mask); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 } | 997 } |
| 997 } | 998 } |
| 998 } | 999 } |
| 999 | 1000 |
| 1000 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1001 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1001 NavigationController* tab = NULL; | 1002 NavigationController* tab = NULL; |
| 1002 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1003 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 1003 if (tab_contents) | 1004 if (tab_contents) |
| 1004 tab_contents->OnSavePage(); | 1005 tab_contents->OnSavePage(); |
| 1005 } | 1006 } |
| OLD | NEW |