diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:01:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:01:19 +0000 |
commit | f4f50efb4d3ee42470c8057345e902ac42e76801 (patch) | |
tree | 5b4d0c57cd94d8169db9dc441f424d6443e4f490 /chrome/browser/automation | |
parent | 0bd22cab9c919ff8d9b35153f6799dc031fe2770 (diff) | |
download | chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.zip chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.tar.gz chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.tar.bz2 |
Cleanup: de-inline a bunch of classes, rename and move "PluginInstaller" to "PluginInstallerInfoBarDelegate" for clarity, lots of other misc. stuff
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6249010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
4 files changed, 16 insertions, 18 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index f00a0a4..294ba39 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -71,11 +71,9 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/ssl/ssl_manager.h" #include "chrome/browser/ssl/ssl_blocking_page.h" -#include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_view.h" -#include "chrome/browser/translate/translate_infobar_delegate.h" #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" #include "chrome/browser/ui/find_bar/find_bar.h" diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 8b53b4a..111c220 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -696,7 +696,8 @@ BrowserCountChangeNotificationObserver::BrowserCountChangeNotificationObserver( } void BrowserCountChangeNotificationObserver::Observe( - NotificationType type, const NotificationSource& source, + NotificationType type, + const NotificationSource& source, const NotificationDetails& details) { DCHECK(type == NotificationType::BROWSER_OPENED || type == NotificationType::BROWSER_CLOSED); diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index a4fc56a..eab458f 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -1676,11 +1676,10 @@ void TestingAutomationProvider::ClickInfoBarAccept( if (tab_tracker_->ContainsHandle(handle)) { NavigationController* nav_controller = tab_tracker_->GetResource(handle); if (nav_controller) { - int count = nav_controller->tab_contents()->infobar_delegate_count(); - if (info_bar_index >= 0 && info_bar_index < count) { - if (wait_for_navigation) { + if (info_bar_index >= 0 && info_bar_index < nav_controller-> + tab_contents()->infobar_delegate_count()) { + if (wait_for_navigation) AddNavigationStatusListener(nav_controller, reply_message, 1, false); - } InfoBarDelegate* delegate = nav_controller->tab_contents()->GetInfoBarDelegateAt( info_bar_index); @@ -1814,7 +1813,8 @@ void TestingAutomationProvider::ClickAppModalDialogButton(int button, } void TestingAutomationProvider::WaitForBrowserWindowCountToBecome( - int target_count, IPC::Message* reply_message) { + int target_count, + IPC::Message* reply_message) { if (static_cast<int>(BrowserList::size()) == target_count) { AutomationMsg_WaitForBrowserWindowCountToBecome::WriteReplyParams( reply_message, true); @@ -2123,11 +2123,9 @@ void TestingAutomationProvider::SetWindowDimensions( ListValue* TestingAutomationProvider::GetInfobarsInfo(TabContents* tc) { // Each infobar may have different properties depending on the type. ListValue* infobars = new ListValue; - for (int infobar_index = 0; - infobar_index < tc->infobar_delegate_count(); - ++infobar_index) { + for (int i = 0; i < tc->infobar_delegate_count(); ++i) { DictionaryValue* infobar_item = new DictionaryValue; - InfoBarDelegate* infobar = tc->GetInfoBarDelegateAt(infobar_index); + InfoBarDelegate* infobar = tc->GetInfoBarDelegateAt(i); if (infobar->AsConfirmInfoBarDelegate()) { // Also covers ThemeInstalledInfoBarDelegate and // CrashedExtensionInfoBarDelegate. @@ -2138,13 +2136,13 @@ ListValue* TestingAutomationProvider::GetInfobarsInfo(TabContents* tc) { infobar_item->SetString("link_text", confirm_infobar->GetLinkText()); ListValue* buttons_list = new ListValue; int buttons = confirm_infobar->GetButtons(); - if (ConfirmInfoBarDelegate::BUTTON_OK & buttons) { + if (buttons & ConfirmInfoBarDelegate::BUTTON_OK) { StringValue* button_label = new StringValue( confirm_infobar->GetButtonLabel( ConfirmInfoBarDelegate::BUTTON_OK)); buttons_list->Append(button_label); } - if (ConfirmInfoBarDelegate::BUTTON_CANCEL & buttons) { + if (buttons & ConfirmInfoBarDelegate::BUTTON_CANCEL) { StringValue* button_label = new StringValue( confirm_infobar->GetButtonLabel( ConfirmInfoBarDelegate::BUTTON_CANCEL)); diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index 6bda672..941c0b4 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -296,7 +296,8 @@ class TestingAutomationProvider : public AutomationProvider, // Causes a click on the "accept" button of the info-bar at |info_bar_index|. // If |wait_for_navigation| is true, it sends the reply after a navigation has // occurred. - void ClickInfoBarAccept(int handle, int info_bar_index, + void ClickInfoBarAccept(int handle, + int info_bar_index, bool wait_for_navigation, IPC::Message* reply_message); |