| 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/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4192 reply.SendError(error); | 4192 reply.SendError(error); |
| 4193 return; | 4193 return; |
| 4194 } | 4194 } |
| 4195 | 4195 |
| 4196 RenderViewHost* render_view = web_contents->GetRenderViewHost(); | 4196 RenderViewHost* render_view = web_contents->GetRenderViewHost(); |
| 4197 if (!render_view) { | 4197 if (!render_view) { |
| 4198 reply.SendError("Tab has no associated RenderViewHost"); | 4198 reply.SendError("Tab has no associated RenderViewHost"); |
| 4199 return; | 4199 return; |
| 4200 } | 4200 } |
| 4201 | 4201 |
| 4202 TabContents* tab_contents = TabContents::FromWebContents(web_contents); | 4202 AutomationTabHelper* automation_tab_helper = |
| 4203 tab_contents->automation_tab_helper()->HeapProfilerDump(reason_string); | 4203 AutomationTabHelper::FromWebContents(web_contents); |
| 4204 automation_tab_helper->HeapProfilerDump(reason_string); |
| 4204 reply.SendSuccess(NULL); | 4205 reply.SendSuccess(NULL); |
| 4205 return; | 4206 return; |
| 4206 } | 4207 } |
| 4207 | 4208 |
| 4208 reply.SendError("Process type is not supported"); | 4209 reply.SendError("Process type is not supported"); |
| 4209 } | 4210 } |
| 4210 #endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) | 4211 #endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) |
| 4211 | 4212 |
| 4212 namespace { | 4213 namespace { |
| 4213 | 4214 |
| (...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6344 void TestingAutomationProvider::OnRemoveProvider() { | 6345 void TestingAutomationProvider::OnRemoveProvider() { |
| 6345 if (g_browser_process) | 6346 if (g_browser_process) |
| 6346 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6347 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6347 } | 6348 } |
| 6348 | 6349 |
| 6349 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 6350 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
| 6350 WebContents* tab) { | 6351 WebContents* tab) { |
| 6351 if (chrome::GetActiveWebContents(browser) != tab) | 6352 if (chrome::GetActiveWebContents(browser) != tab) |
| 6352 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true); | 6353 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true); |
| 6353 } | 6354 } |
| OLD | NEW |