Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10963061: Switch AutomationTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_tab_helper_unittest.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698