| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, | 758 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, |
| 759 int cmd, | 759 int cmd, |
| 760 int param) { | 760 int param) { |
| 761 RenderViewHost* view = GetViewForTab(tab_handle); | 761 RenderViewHost* view = GetViewForTab(tab_handle); |
| 762 if (!view) { | 762 if (!view) { |
| 763 NOTREACHED(); | 763 NOTREACHED(); |
| 764 return; | 764 return; |
| 765 } | 765 } |
| 766 | 766 |
| 767 view->Send(new ChromeViewMsg_JavaScriptStressTestControl( | 767 view->Send(new ChromeViewMsg_JavaScriptStressTestControl( |
| 768 view->routing_id(), cmd, param)); | 768 view->GetRoutingID(), cmd, param)); |
| 769 } | 769 } |
| 770 | 770 |
| 771 void AutomationProvider::BeginTracing(const std::string& categories, | 771 void AutomationProvider::BeginTracing(const std::string& categories, |
| 772 bool* success) { | 772 bool* success) { |
| 773 tracing_data_.trace_output.clear(); | 773 tracing_data_.trace_output.clear(); |
| 774 *success = TraceController::GetInstance()->BeginTracing(this, categories); | 774 *success = TraceController::GetInstance()->BeginTracing(this, categories); |
| 775 } | 775 } |
| 776 | 776 |
| 777 void AutomationProvider::EndTracing(IPC::Message* reply_message) { | 777 void AutomationProvider::EndTracing(IPC::Message* reply_message) { |
| 778 bool success = false; | 778 bool success = false; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 } | 1011 } |
| 1012 } | 1012 } |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1015 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1016 NavigationController* tab = NULL; | 1016 NavigationController* tab = NULL; |
| 1017 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 1017 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
| 1018 if (web_contents) | 1018 if (web_contents) |
| 1019 web_contents->OnSavePage(); | 1019 web_contents->OnSavePage(); |
| 1020 } | 1020 } |
| OLD | NEW |