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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit fixes redux Created 7 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 } 835 }
836 836
837 // static 837 // static
838 void Browser::JSOutOfMemoryHelper(WebContents* web_contents) { 838 void Browser::JSOutOfMemoryHelper(WebContents* web_contents) {
839 InfoBarService* infobar_service = 839 InfoBarService* infobar_service =
840 InfoBarService::FromWebContents(web_contents); 840 InfoBarService::FromWebContents(web_contents);
841 if (!infobar_service) 841 if (!infobar_service)
842 return; 842 return;
843 843
844 SimpleAlertInfoBarDelegate::Create( 844 SimpleAlertInfoBarDelegate::Create(
845 infobar_service, NULL, 845 infobar_service, InfoBarDelegate::kNoIconID,
846 l10n_util::GetStringUTF16(IDS_JS_OUT_OF_MEMORY_PROMPT), true); 846 l10n_util::GetStringUTF16(IDS_JS_OUT_OF_MEMORY_PROMPT), true);
847 } 847 }
848 848
849 // static 849 // static
850 void Browser::RegisterProtocolHandlerHelper(WebContents* web_contents, 850 void Browser::RegisterProtocolHandlerHelper(WebContents* web_contents,
851 const std::string& protocol, 851 const std::string& protocol,
852 const GURL& url, 852 const GURL& url,
853 const string16& title, 853 const string16& title,
854 bool user_gesture, 854 bool user_gesture,
855 BrowserWindow* window) { 855 BrowserWindow* window) {
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 1505
1506 chrome::ShowHungRendererDialog(source); 1506 chrome::ShowHungRendererDialog(source);
1507 } 1507 }
1508 1508
1509 void Browser::RendererResponsive(WebContents* source) { 1509 void Browser::RendererResponsive(WebContents* source) {
1510 chrome::HideHungRendererDialog(source); 1510 chrome::HideHungRendererDialog(source);
1511 } 1511 }
1512 1512
1513 void Browser::WorkerCrashed(WebContents* source) { 1513 void Browser::WorkerCrashed(WebContents* source) {
1514 SimpleAlertInfoBarDelegate::Create( 1514 SimpleAlertInfoBarDelegate::Create(
1515 InfoBarService::FromWebContents(source), NULL, 1515 InfoBarService::FromWebContents(source), InfoBarDelegate::kNoIconID,
1516 l10n_util::GetStringUTF16(IDS_WEBWORKER_CRASHED_PROMPT), true); 1516 l10n_util::GetStringUTF16(IDS_WEBWORKER_CRASHED_PROMPT), true);
1517 } 1517 }
1518 1518
1519 void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) { 1519 void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) {
1520 if (web_contents == tab_strip_model_->GetActiveWebContents()) 1520 if (web_contents == tab_strip_model_->GetActiveWebContents())
1521 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); 1521 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
1522 } 1522 }
1523 1523
1524 void Browser::DidNavigateToPendingEntry(WebContents* web_contents) { 1524 void Browser::DidNavigateToPendingEntry(WebContents* web_contents) {
1525 if (web_contents == tab_strip_model_->GetActiveWebContents()) 1525 if (web_contents == tab_strip_model_->GetActiveWebContents())
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 if (contents && !allow_js_access) { 2262 if (contents && !allow_js_access) {
2263 contents->web_contents()->GetController().LoadURL( 2263 contents->web_contents()->GetController().LoadURL(
2264 target_url, 2264 target_url,
2265 content::Referrer(), 2265 content::Referrer(),
2266 content::PAGE_TRANSITION_LINK, 2266 content::PAGE_TRANSITION_LINK,
2267 std::string()); // No extra headers. 2267 std::string()); // No extra headers.
2268 } 2268 }
2269 2269
2270 return contents != NULL; 2270 return contents != NULL;
2271 } 2271 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/auto_login_infobar_delegate.cc ('k') | chrome/browser/ui/chrome_select_file_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698