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

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

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 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 5839 matching lines...) Expand 10 before | Expand all | Expand 10 after
5850 } 5850 }
5851 5851
5852 NavigationController* controller = tab_tracker_->GetResource(tab_handle); 5852 NavigationController* controller = tab_tracker_->GetResource(tab_handle);
5853 if (!controller) { 5853 if (!controller) {
5854 AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message_, false); 5854 AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message_, false);
5855 Send(reply_message_); 5855 Send(reply_message_);
5856 return; 5856 return;
5857 } 5857 }
5858 5858
5859 // The delegate will delete itself. 5859 // The delegate will delete itself.
5860 new InfoBarCountObserver(this, reply_message, controller->tab_contents(), 5860 new InfoBarCountObserver(this, reply_message,
5861 target_count); 5861 TabContentsWrapper::GetCurrentWrapperForContents(
5862 controller->tab_contents()), target_count);
5862 } 5863 }
5863 5864
5864 // Gets the current used encoding name of the page in the specified tab. 5865 // Gets the current used encoding name of the page in the specified tab.
5865 void TestingAutomationProvider::GetPageCurrentEncoding( 5866 void TestingAutomationProvider::GetPageCurrentEncoding(
5866 int tab_handle, std::string* current_encoding) { 5867 int tab_handle, std::string* current_encoding) {
5867 if (tab_tracker_->ContainsHandle(tab_handle)) { 5868 if (tab_tracker_->ContainsHandle(tab_handle)) {
5868 NavigationController* nav = tab_tracker_->GetResource(tab_handle); 5869 NavigationController* nav = tab_tracker_->GetResource(tab_handle);
5869 Browser* browser = FindAndActivateTab(nav); 5870 Browser* browser = FindAndActivateTab(nav);
5870 DCHECK(browser); 5871 DCHECK(browser);
5871 5872
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
5965 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 5966 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
5966 5967
5967 Send(reply_message_); 5968 Send(reply_message_);
5968 redirect_query_ = 0; 5969 redirect_query_ = 0;
5969 reply_message_ = NULL; 5970 reply_message_ = NULL;
5970 } 5971 }
5971 5972
5972 void TestingAutomationProvider::OnRemoveProvider() { 5973 void TestingAutomationProvider::OnRemoveProvider() {
5973 AutomationProviderList::GetInstance()->RemoveProvider(this); 5974 AutomationProviderList::GetInstance()->RemoveProvider(this);
5974 } 5975 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/geolocation/geolocation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698