| 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/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 | 728 |
| 729 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, | 729 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, |
| 730 int cmd, | 730 int cmd, |
| 731 int param) { | 731 int param) { |
| 732 RenderViewHost* view = GetViewForTab(tab_handle); | 732 RenderViewHost* view = GetViewForTab(tab_handle); |
| 733 if (!view) { | 733 if (!view) { |
| 734 NOTREACHED(); | 734 NOTREACHED(); |
| 735 return; | 735 return; |
| 736 } | 736 } |
| 737 | 737 |
| 738 view->Send(new ViewMsg_JavaScriptStressTestControl( | 738 view->Send(new ChromeViewMsg_JavaScriptStressTestControl( |
| 739 view->routing_id(), cmd, param)); | 739 view->routing_id(), cmd, param)); |
| 740 } | 740 } |
| 741 | 741 |
| 742 RenderViewHost* AutomationProvider::GetViewForTab(int tab_handle) { | 742 RenderViewHost* AutomationProvider::GetViewForTab(int tab_handle) { |
| 743 if (tab_tracker_->ContainsHandle(tab_handle)) { | 743 if (tab_tracker_->ContainsHandle(tab_handle)) { |
| 744 NavigationController* tab = tab_tracker_->GetResource(tab_handle); | 744 NavigationController* tab = tab_tracker_->GetResource(tab_handle); |
| 745 if (!tab) { | 745 if (!tab) { |
| 746 NOTREACHED(); | 746 NOTREACHED(); |
| 747 return NULL; | 747 return NULL; |
| 748 } | 748 } |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 } | 941 } |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 | 944 |
| 945 void AutomationProvider::SaveAsAsync(int tab_handle) { | 945 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 946 NavigationController* tab = NULL; | 946 NavigationController* tab = NULL; |
| 947 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 947 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 948 if (tab_contents) | 948 if (tab_contents) |
| 949 tab_contents->OnSavePage(); | 949 tab_contents->OnSavePage(); |
| 950 } | 950 } |
| OLD | NEW |