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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extensions/extension_infobar_delegate.h" 5 #include "chrome/browser/extensions/extension_infobar_delegate.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/extensions/extension_view_host.h" 8 #include "chrome/browser/extensions/extension_view_host.h"
9 #include "chrome/browser/extensions/extension_view_host_factory.h" 9 #include "chrome/browser/extensions/extension_view_host_factory.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 infobars::InfoBarDelegate::Type ExtensionInfoBarDelegate::GetInfoBarType() 90 infobars::InfoBarDelegate::Type ExtensionInfoBarDelegate::GetInfoBarType()
91 const { 91 const {
92 return PAGE_ACTION_TYPE; 92 return PAGE_ACTION_TYPE;
93 } 93 }
94 94
95 ExtensionInfoBarDelegate* 95 ExtensionInfoBarDelegate*
96 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() { 96 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() {
97 return this; 97 return this;
98 } 98 }
99 99
100 const ExtensionInfoBarDelegate*
101 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() const {
102 return this;
103 }
104
100 void ExtensionInfoBarDelegate::OnExtensionUnloaded( 105 void ExtensionInfoBarDelegate::OnExtensionUnloaded(
101 content::BrowserContext* browser_context, 106 content::BrowserContext* browser_context,
102 const extensions::Extension* extension, 107 const extensions::Extension* extension,
103 extensions::UnloadedExtensionInfo::Reason reason) { 108 extensions::UnloadedExtensionInfo::Reason reason) {
104 if (extension_ == extension) 109 if (extension_ == extension)
105 infobar()->RemoveSelf(); 110 infobar()->RemoveSelf();
106 } 111 }
107 112
108 void ExtensionInfoBarDelegate::Observe( 113 void ExtensionInfoBarDelegate::Observe(
109 int type, 114 int type,
110 const content::NotificationSource& source, 115 const content::NotificationSource& source,
111 const content::NotificationDetails& details) { 116 const content::NotificationDetails& details) {
112 DCHECK_EQ(type, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE); 117 DCHECK_EQ(type, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE);
113 if (extension_view_host_.get() == 118 if (extension_view_host_.get() ==
114 content::Details<extensions::ExtensionHost>(details).ptr()) 119 content::Details<extensions::ExtensionHost>(details).ptr())
115 infobar()->RemoveSelf(); 120 infobar()->RemoveSelf();
116 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698