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

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

Issue 6262018: Cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2146 ConfirmInfoBarDelegate::BUTTON_OK)); 2146 ConfirmInfoBarDelegate::BUTTON_OK));
2147 buttons_list->Append(button_label); 2147 buttons_list->Append(button_label);
2148 } 2148 }
2149 if (buttons & ConfirmInfoBarDelegate::BUTTON_CANCEL) { 2149 if (buttons & ConfirmInfoBarDelegate::BUTTON_CANCEL) {
2150 StringValue* button_label = new StringValue( 2150 StringValue* button_label = new StringValue(
2151 confirm_infobar->GetButtonLabel( 2151 confirm_infobar->GetButtonLabel(
2152 ConfirmInfoBarDelegate::BUTTON_CANCEL)); 2152 ConfirmInfoBarDelegate::BUTTON_CANCEL));
2153 buttons_list->Append(button_label); 2153 buttons_list->Append(button_label);
2154 } 2154 }
2155 infobar_item->Set("buttons", buttons_list); 2155 infobar_item->Set("buttons", buttons_list);
2156 } else if (infobar->AsAlertInfoBarDelegate()) {
2157 infobar_item->SetString("type", "alert_infobar");
2158 AlertInfoBarDelegate* alert_infobar =
2159 infobar->AsAlertInfoBarDelegate();
2160 infobar_item->SetString("text", alert_infobar->GetMessageText());
2161 } else if (infobar->AsLinkInfoBarDelegate()) { 2156 } else if (infobar->AsLinkInfoBarDelegate()) {
2162 infobar_item->SetString("type", "link_infobar"); 2157 infobar_item->SetString("type", "link_infobar");
2163 LinkInfoBarDelegate* link_infobar = infobar->AsLinkInfoBarDelegate(); 2158 LinkInfoBarDelegate* link_infobar = infobar->AsLinkInfoBarDelegate();
2164 infobar_item->SetString("link_text", link_infobar->GetLinkText()); 2159 infobar_item->SetString("link_text", link_infobar->GetLinkText());
2165 } else if (infobar->AsTranslateInfoBarDelegate()) { 2160 } else if (infobar->AsTranslateInfoBarDelegate()) {
2166 infobar_item->SetString("type", "translate_infobar"); 2161 infobar_item->SetString("type", "translate_infobar");
2167 TranslateInfoBarDelegate* translate_infobar = 2162 TranslateInfoBarDelegate* translate_infobar =
2168 infobar->AsTranslateInfoBarDelegate(); 2163 infobar->AsTranslateInfoBarDelegate();
2169 infobar_item->SetString("original_lang_code", 2164 infobar_item->SetString("original_lang_code",
2170 translate_infobar->GetOriginalLanguageCode()); 2165 translate_infobar->GetOriginalLanguageCode());
(...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
4514 // If you change this, update Observer for NotificationType::SESSION_END 4509 // If you change this, update Observer for NotificationType::SESSION_END
4515 // below. 4510 // below.
4516 MessageLoop::current()->PostTask(FROM_HERE, 4511 MessageLoop::current()->PostTask(FROM_HERE,
4517 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); 4512 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider));
4518 } 4513 }
4519 } 4514 }
4520 4515
4521 void TestingAutomationProvider::OnRemoveProvider() { 4516 void TestingAutomationProvider::OnRemoveProvider() {
4522 AutomationProviderList::GetInstance()->RemoveProvider(this); 4517 AutomationProviderList::GetInstance()->RemoveProvider(this);
4523 } 4518 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_cc_infobar_win.cc ('k') | chrome/browser/download/download_request_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698