| OLD | NEW |
| 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 @end | 206 @end |
| 207 | 207 |
| 208 | 208 |
| 209 class FakeTheme : public ui::ThemeProvider { | 209 class FakeTheme : public ui::ThemeProvider { |
| 210 public: | 210 public: |
| 211 FakeTheme(NSColor* color) : color_(color) {} | 211 FakeTheme(NSColor* color) : color_(color) {} |
| 212 base::scoped_nsobject<NSColor> color_; | 212 base::scoped_nsobject<NSColor> color_; |
| 213 | 213 |
| 214 virtual bool UsingSystemTheme() const override { | 214 bool UsingSystemTheme() const override { return true; } |
| 215 return true; | 215 gfx::ImageSkia* GetImageSkiaNamed(int id) const override { return NULL; } |
| 216 } | 216 SkColor GetColor(int id) const override { return SkColor(); } |
| 217 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const override { | 217 int GetDisplayProperty(int id) const override { return -1; } |
| 218 bool ShouldUseNativeFrame() const override { return false; } |
| 219 bool HasCustomImage(int id) const override { return false; } |
| 220 base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor) |
| 221 const override { |
| 218 return NULL; | 222 return NULL; |
| 219 } | 223 } |
| 220 virtual SkColor GetColor(int id) const override { return SkColor(); } | 224 NSImage* GetNSImageNamed(int id) const override { return nil; } |
| 221 virtual int GetDisplayProperty(int id) const override { | 225 NSColor* GetNSImageColorNamed(int id) const override { return nil; } |
| 222 return -1; | 226 NSColor* GetNSColor(int id) const override { return color_.get(); } |
| 223 } | 227 NSColor* GetNSColorTint(int id) const override { return nil; } |
| 224 virtual bool ShouldUseNativeFrame() const override { return false; } | 228 NSGradient* GetNSGradient(int id) const override { return nil; } |
| 225 virtual bool HasCustomImage(int id) const override { return false; } | |
| 226 virtual base::RefCountedMemory* GetRawData( | |
| 227 int id, | |
| 228 ui::ScaleFactor scale_factor) const override { | |
| 229 return NULL; | |
| 230 } | |
| 231 virtual NSImage* GetNSImageNamed(int id) const override { | |
| 232 return nil; | |
| 233 } | |
| 234 virtual NSColor* GetNSImageColorNamed(int id) const override { | |
| 235 return nil; | |
| 236 } | |
| 237 virtual NSColor* GetNSColor(int id) const override { | |
| 238 return color_.get(); | |
| 239 } | |
| 240 virtual NSColor* GetNSColorTint(int id) const override { | |
| 241 return nil; | |
| 242 } | |
| 243 virtual NSGradient* GetNSGradient(int id) const override { | |
| 244 return nil; | |
| 245 } | |
| 246 }; | 229 }; |
| 247 | 230 |
| 248 | 231 |
| 249 @interface FakeDragInfo : NSObject { | 232 @interface FakeDragInfo : NSObject { |
| 250 @public | 233 @public |
| 251 NSPoint dropLocation_; | 234 NSPoint dropLocation_; |
| 252 NSDragOperation sourceMask_; | 235 NSDragOperation sourceMask_; |
| 253 } | 236 } |
| 254 @property (nonatomic, assign) NSPoint dropLocation; | 237 @property (nonatomic, assign) NSPoint dropLocation; |
| 255 - (void)setDraggingSourceOperationMask:(NSDragOperation)mask; | 238 - (void)setDraggingSourceOperationMask:(NSDragOperation)mask; |
| (...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2141 "2f3b ] 4b "); | 2124 "2f3b ] 4b "); |
| 2142 actual = test::ModelStringFromNode(root); | 2125 actual = test::ModelStringFromNode(root); |
| 2143 EXPECT_EQ(expected, actual); | 2126 EXPECT_EQ(expected, actual); |
| 2144 | 2127 |
| 2145 // Verify that the other bookmark folder can't be deleted. | 2128 // Verify that the other bookmark folder can't be deleted. |
| 2146 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; | 2129 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; |
| 2147 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); | 2130 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); |
| 2148 } | 2131 } |
| 2149 | 2132 |
| 2150 } // namespace | 2133 } // namespace |
| OLD | NEW |