| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 7 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
| 8 #include "chrome/browser/metrics/user_metrics.h" | 8 #include "chrome/browser/metrics/user_metrics.h" |
| 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
| 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 [controller_ updateTheme:themeProvider]; | 65 [controller_ updateTheme:themeProvider]; |
| 66 } | 66 } |
| 67 | 67 |
| 68 - (void)viewDidMoveToWindow { | 68 - (void)viewDidMoveToWindow { |
| 69 [controller_ viewDidMoveToWindow]; | 69 [controller_ viewDidMoveToWindow]; |
| 70 } | 70 } |
| 71 | 71 |
| 72 // Called after the current theme has changed. | 72 // Called after the current theme has changed. |
| 73 - (void)themeDidChangeNotification:(NSNotification*)aNotification { | 73 - (void)themeDidChangeNotification:(NSNotification*)aNotification { |
| 74 ui::ThemeProvider* themeProvider = | 74 ui::ThemeProvider* themeProvider = |
| 75 static_cast<ui::ThemeProvider*>([[aNotification object] pointerValue]); | 75 static_cast<ThemeService*>([[aNotification object] pointerValue]); |
| 76 [self updateTheme:themeProvider]; | 76 [self updateTheme:themeProvider]; |
| 77 } | 77 } |
| 78 | 78 |
| 79 // Adapt appearance to the current theme. Called after theme changes and before | 79 // Adapt appearance to the current theme. Called after theme changes and before |
| 80 // this is shown for the first time. | 80 // this is shown for the first time. |
| 81 - (void)updateTheme:(ui::ThemeProvider*)themeProvider { | 81 - (void)updateTheme:(ui::ThemeProvider*)themeProvider { |
| 82 if (!themeProvider) | 82 if (!themeProvider) |
| 83 return; | 83 return; |
| 84 | 84 |
| 85 NSColor* color = | 85 NSColor* color = |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 - (void)setController:(id)controller { | 242 - (void)setController:(id)controller { |
| 243 controller_ = controller; | 243 controller_ = controller; |
| 244 } | 244 } |
| 245 | 245 |
| 246 - (ViewID)viewID { | 246 - (ViewID)viewID { |
| 247 return VIEW_ID_BOOKMARK_BAR; | 247 return VIEW_ID_BOOKMARK_BAR; |
| 248 } | 248 } |
| 249 | 249 |
| 250 @end // @implementation BookmarkBarView | 250 @end // @implementation BookmarkBarView |
| OLD | NEW |