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