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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/image_decoration.h

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_ 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_
7 7
8 #import "base/memory/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" 9 #include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
10 10
11 // |LocationBarDecoration| which sizes and draws itself according to 11 // |LocationBarDecoration| which sizes and draws itself according to
12 // an |NSImage|. 12 // an |NSImage|.
13 13
14 class ImageDecoration : public LocationBarDecoration { 14 class ImageDecoration : public LocationBarDecoration {
15 public: 15 public:
16 ImageDecoration(); 16 ImageDecoration();
17 virtual ~ImageDecoration(); 17 virtual ~ImageDecoration();
18 18
19 NSImage* GetImage(); 19 NSImage* GetImage();
20 void SetImage(NSImage* image); 20 void SetImage(NSImage* image);
21 21
22 // Returns the part of |frame| the image is drawn in. 22 // Returns the part of |frame| the image is drawn in.
23 NSRect GetDrawRectInFrame(NSRect frame); 23 NSRect GetDrawRectInFrame(NSRect frame);
24 24
25 // Implement |LocationBarDecoration|. 25 // Implement |LocationBarDecoration|.
26 virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE; 26 virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE;
27 virtual void DrawInFrame(NSRect frame, NSView* control_view) OVERRIDE; 27 virtual void DrawInFrame(NSRect frame, NSView* control_view) OVERRIDE;
28 28
29 private: 29 private:
30 scoped_nsobject<NSImage> image_; 30 base::scoped_nsobject<NSImage> image_;
31 31
32 DISALLOW_COPY_AND_ASSIGN(ImageDecoration); 32 DISALLOW_COPY_AND_ASSIGN(ImageDecoration);
33 }; 33 };
34 34
35 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_ 35 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698