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

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

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming back to GetIcon() 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/omnibox/alternate_nav_infobar_delegate.h" 5 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // the future. 49 // the future.
50 content::PAGE_TRANSITION_TYPED, 50 content::PAGE_TRANSITION_TYPED,
51 false); 51 false);
52 web_contents()->OpenURL(params); 52 web_contents()->OpenURL(params);
53 53
54 // We should always close, even if the navigation did not occur within this 54 // We should always close, even if the navigation did not occur within this
55 // WebContents. 55 // WebContents.
56 return true; 56 return true;
57 } 57 }
58 58
59 gfx::Image* AlternateNavInfoBarDelegate::GetIcon() const { 59 int AlternateNavInfoBarDelegate::GetIconID() const {
60 return &ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 60 return IDR_INFOBAR_ALT_NAV_URL;
61 IDR_INFOBAR_ALT_NAV_URL);
62 } 61 }
63 62
64 InfoBarDelegate::Type AlternateNavInfoBarDelegate::GetInfoBarType() const { 63 InfoBarDelegate::Type AlternateNavInfoBarDelegate::GetInfoBarType() const {
65 return PAGE_ACTION_TYPE; 64 return PAGE_ACTION_TYPE;
66 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698