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

Side by Side Diff: chrome/browser/ui/views/infobars/extension_infobar.cc

Issue 657333002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (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/ui/views/infobars/extension_infobar.h" 5 #include "chrome/browser/ui/views/infobars/extension_infobar.h"
6 6
7 #include "chrome/browser/extensions/extension_context_menu_model.h" 7 #include "chrome/browser/extensions/extension_context_menu_model.h"
8 #include "chrome/browser/extensions/extension_infobar_delegate.h" 8 #include "chrome/browser/extensions/extension_infobar_delegate.h"
9 #include "chrome/browser/extensions/extension_view_host.h" 9 #include "chrome/browser/extensions/extension_view_host.h"
10 #include "chrome/browser/platform_util.h" 10 #include "chrome/browser/platform_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const gfx::ImageSkia drop_image_; 78 const gfx::ImageSkia drop_image_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(MenuImageSource); 80 DISALLOW_COPY_AND_ASSIGN(MenuImageSource);
81 }; 81 };
82 82
83 } // namespace 83 } // namespace
84 84
85 ExtensionInfoBar::ExtensionInfoBar( 85 ExtensionInfoBar::ExtensionInfoBar(
86 scoped_ptr<ExtensionInfoBarDelegate> delegate, 86 scoped_ptr<ExtensionInfoBarDelegate> delegate,
87 Browser* browser) 87 Browser* browser)
88 : InfoBarView(delegate.PassAs<infobars::InfoBarDelegate>()), 88 : InfoBarView(delegate.Pass()),
89 browser_(browser), 89 browser_(browser),
90 infobar_icon_(NULL), 90 infobar_icon_(NULL),
91 icon_as_menu_(NULL), 91 icon_as_menu_(NULL),
92 icon_as_image_(NULL), 92 icon_as_image_(NULL),
93 weak_ptr_factory_(this) { 93 weak_ptr_factory_(this) {
94 } 94 }
95 95
96 ExtensionInfoBar::~ExtensionInfoBar() { 96 ExtensionInfoBar::~ExtensionInfoBar() {
97 } 97 }
98 98
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 ExtensionViewViews* ExtensionInfoBar::GetExtensionView() { 229 ExtensionViewViews* ExtensionInfoBar::GetExtensionView() {
230 return static_cast<ExtensionViewViews*>( 230 return static_cast<ExtensionViewViews*>(
231 GetDelegate()->extension_view_host()->view()); 231 GetDelegate()->extension_view_host()->view());
232 } 232 }
233 233
234 int ExtensionInfoBar::NonExtensionViewWidth() const { 234 int ExtensionInfoBar::NonExtensionViewWidth() const {
235 return infobar_icon_->width() + kIconHorizontalMargin; 235 return infobar_icon_->width() + kIconHorizontalMargin;
236 } 236 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/confirm_infobar.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698