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

Side by Side Diff: chrome/browser/extensions/theme_installed_infobar_delegate.cc

Issue 6926001: Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | 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/extensions/theme_installed_infobar_delegate.h" 5 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 if (previous_using_native_theme_) { 64 if (previous_using_native_theme_) {
65 theme_service_->SetNativeTheme(); 65 theme_service_->SetNativeTheme();
66 } else { 66 } else {
67 theme_service_->UseDefaultTheme(); 67 theme_service_->UseDefaultTheme();
68 } 68 }
69 return true; 69 return true;
70 } 70 }
71 71
72 void ThemeInstalledInfoBarDelegate::InfoBarClosed() {
73 delete this;
74 }
75
76 gfx::Image* ThemeInstalledInfoBarDelegate::GetIcon() const { 72 gfx::Image* ThemeInstalledInfoBarDelegate::GetIcon() const {
77 // TODO(aa): Reply with the theme's icon, but this requires reading it 73 // TODO(aa): Reply with the theme's icon, but this requires reading it
78 // asynchronously from disk. 74 // asynchronously from disk.
79 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( 75 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
80 IDR_INFOBAR_THEME); 76 IDR_INFOBAR_THEME);
81 } 77 }
82 78
83 ThemeInstalledInfoBarDelegate* 79 ThemeInstalledInfoBarDelegate*
84 ThemeInstalledInfoBarDelegate::AsThemePreviewInfobarDelegate() { 80 ThemeInstalledInfoBarDelegate::AsThemePreviewInfobarDelegate() {
85 return this; 81 return this;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 tab_contents_ = NULL; 113 tab_contents_ = NULL;
118 // Although it's not being used anymore, this delegate is never deleted. 114 // Although it's not being used anymore, this delegate is never deleted.
119 // It can not be deleted now because it is still needed if we 115 // It can not be deleted now because it is still needed if we
120 // "undo" the theme change that triggered this notification 116 // "undo" the theme change that triggered this notification
121 // (when InfoBar::OnBackgroundExpose() is called). This will likely 117 // (when InfoBar::OnBackgroundExpose() is called). This will likely
122 // be fixed when infobar delegate deletion is cleaned up for 118 // be fixed when infobar delegate deletion is cleaned up for
123 // http://crbug.com/62154. 119 // http://crbug.com/62154.
124 } 120 }
125 } 121 }
126 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698