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

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

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_manager_extension_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 6556 matching lines...) Expand 10 before | Expand all | Expand 10 after
6567 6567
6568 // Gets the current used encoding name of the page in the specified tab. 6568 // Gets the current used encoding name of the page in the specified tab.
6569 void TestingAutomationProvider::GetPageCurrentEncoding( 6569 void TestingAutomationProvider::GetPageCurrentEncoding(
6570 int tab_handle, std::string* current_encoding) { 6570 int tab_handle, std::string* current_encoding) {
6571 if (tab_tracker_->ContainsHandle(tab_handle)) { 6571 if (tab_tracker_->ContainsHandle(tab_handle)) {
6572 NavigationController* nav = tab_tracker_->GetResource(tab_handle); 6572 NavigationController* nav = tab_tracker_->GetResource(tab_handle);
6573 Browser* browser = FindAndActivateTab(nav); 6573 Browser* browser = FindAndActivateTab(nav);
6574 DCHECK(browser); 6574 DCHECK(browser);
6575 6575
6576 if (browser->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU)) 6576 if (browser->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU))
6577 *current_encoding = nav->tab_contents()->encoding(); 6577 *current_encoding = nav->tab_contents()->GetEncoding();
6578 } 6578 }
6579 } 6579 }
6580 6580
6581 void TestingAutomationProvider::ShutdownSessionService(int handle, 6581 void TestingAutomationProvider::ShutdownSessionService(int handle,
6582 bool* result) { 6582 bool* result) {
6583 if (browser_tracker_->ContainsHandle(handle)) { 6583 if (browser_tracker_->ContainsHandle(handle)) {
6584 Browser* browser = browser_tracker_->GetResource(handle); 6584 Browser* browser = browser_tracker_->GetResource(handle);
6585 SessionServiceFactory::ShutdownForProfile(browser->profile()); 6585 SessionServiceFactory::ShutdownForProfile(browser->profile());
6586 *result = true; 6586 *result = true;
6587 } else { 6587 } else {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
6673 6673
6674 Send(reply_message_); 6674 Send(reply_message_);
6675 redirect_query_ = 0; 6675 redirect_query_ = 0;
6676 reply_message_ = NULL; 6676 reply_message_ = NULL;
6677 } 6677 }
6678 6678
6679 void TestingAutomationProvider::OnRemoveProvider() { 6679 void TestingAutomationProvider::OnRemoveProvider() {
6680 if (g_browser_process) 6680 if (g_browser_process)
6681 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6681 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6682 } 6682 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_manager_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698