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

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 5831 matching lines...) Expand 10 before | Expand all | Expand 10 after
5842 } 5842 }
5843 5843
5844 NavigationController* controller = tab_tracker_->GetResource(tab_handle); 5844 NavigationController* controller = tab_tracker_->GetResource(tab_handle);
5845 if (!controller) { 5845 if (!controller) {
5846 AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message_, false); 5846 AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message_, false);
5847 Send(reply_message_); 5847 Send(reply_message_);
5848 return; 5848 return;
5849 } 5849 }
5850 5850
5851 // The delegate will delete itself. 5851 // The delegate will delete itself.
5852 new InfoBarCountObserver(this, reply_message, controller->tab_contents(), 5852 new InfoBarCountObserver(this, reply_message,
5853 target_count); 5853 TabContentsWrapper::GetCurrentWrapperForContents(
5854 controller->tab_contents()), target_count);
5854 } 5855 }
5855 5856
5856 // Gets the current used encoding name of the page in the specified tab. 5857 // Gets the current used encoding name of the page in the specified tab.
5857 void TestingAutomationProvider::GetPageCurrentEncoding( 5858 void TestingAutomationProvider::GetPageCurrentEncoding(
5858 int tab_handle, std::string* current_encoding) { 5859 int tab_handle, std::string* current_encoding) {
5859 if (tab_tracker_->ContainsHandle(tab_handle)) { 5860 if (tab_tracker_->ContainsHandle(tab_handle)) {
5860 NavigationController* nav = tab_tracker_->GetResource(tab_handle); 5861 NavigationController* nav = tab_tracker_->GetResource(tab_handle);
5861 Browser* browser = FindAndActivateTab(nav); 5862 Browser* browser = FindAndActivateTab(nav);
5862 DCHECK(browser); 5863 DCHECK(browser);
5863 5864
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
5957 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 5958 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
5958 5959
5959 Send(reply_message_); 5960 Send(reply_message_);
5960 redirect_query_ = 0; 5961 redirect_query_ = 0;
5961 reply_message_ = NULL; 5962 reply_message_ = NULL;
5962 } 5963 }
5963 5964
5964 void TestingAutomationProvider::OnRemoveProvider() { 5965 void TestingAutomationProvider::OnRemoveProvider() {
5965 AutomationProviderList::GetInstance()->RemoveProvider(this); 5966 AutomationProviderList::GetInstance()->RemoveProvider(this);
5966 } 5967 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698