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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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 (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 #import "chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "chrome/browser/extensions/extension_host.h" 9 #include "chrome/browser/extensions/extension_host.h"
10 #include "chrome/browser/extensions/extension_infobar_delegate.h" 10 #include "chrome/browser/extensions/extension_infobar_delegate.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 LoadIcon(); 62 LoadIcon();
63 } 63 }
64 64
65 virtual ~InfobarBridge() { 65 virtual ~InfobarBridge() {
66 if (delegate_) 66 if (delegate_)
67 delegate_->set_observer(NULL); 67 delegate_->set_observer(NULL);
68 } 68 }
69 69
70 // Load the Extension's icon image. 70 // Load the Extension's icon image.
71 void LoadIcon() { 71 void LoadIcon() {
72 const Extension* extension = delegate_->extension_host()->extension(); 72 const extensions::Extension* extension = delegate_->extension_host()->
73 extension();
73 ExtensionResource icon_resource = 74 ExtensionResource icon_resource =
74 extension->GetIconResource(ExtensionIconSet::EXTENSION_ICON_BITTY, 75 extension->GetIconResource(ExtensionIconSet::EXTENSION_ICON_BITTY,
75 ExtensionIconSet::MATCH_EXACTLY); 76 ExtensionIconSet::MATCH_EXACTLY);
76 tracker_.LoadImage(extension, icon_resource, 77 tracker_.LoadImage(extension, icon_resource,
77 gfx::Size(ExtensionIconSet::EXTENSION_ICON_BITTY, 78 gfx::Size(ExtensionIconSet::EXTENSION_ICON_BITTY,
78 ExtensionIconSet::EXTENSION_ICON_BITTY), 79 ExtensionIconSet::EXTENSION_ICON_BITTY),
79 ImageLoadingTracker::DONT_CACHE); 80 ImageLoadingTracker::DONT_CACHE);
80 } 81 }
81 82
82 // ImageLoadingTracker::Observer implementation. 83 // ImageLoadingTracker::Observer implementation.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 269
269 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 270 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) {
270 NSWindow* window = 271 NSWindow* window =
271 [(NSView*)owner->web_contents()->GetContentNativeView() window]; 272 [(NSView*)owner->web_contents()->GetContentNativeView() window];
272 ExtensionInfoBarController* controller = 273 ExtensionInfoBarController* controller =
273 [[ExtensionInfoBarController alloc] initWithDelegate:this 274 [[ExtensionInfoBarController alloc] initWithDelegate:this
274 owner:owner 275 owner:owner
275 window:window]; 276 window:window];
276 return new InfoBar(controller, this); 277 return new InfoBar(controller, this);
277 } 278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698