| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BOOKMARKS_BOOKMARK_BUBBLE_OBSERVER_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUBBLE_OBSERVER_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUBBLE_OBSERVER_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUBBLE_OBSERVER_COCOA_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "chrome/browser/ui/bookmarks/bookmark_bubble_observer.h" | 9 #include "chrome/browser/ui/bookmarks/bookmark_bubble_observer.h" |
| 9 | 10 |
| 10 #import "base/mac/scoped_nsobject.h" | 11 #import "base/mac/scoped_nsobject.h" |
| 11 | 12 |
| 12 @class BrowserWindowController; | 13 @class BrowserWindowController; |
| 13 | 14 |
| 14 // Manages toolbar visibility locking and bookmark button pulsing. | 15 // Manages toolbar visibility locking and bookmark button pulsing. |
| 15 class BookmarkBubbleObserverCocoa : public bookmarks::BookmarkBubbleObserver { | 16 class BookmarkBubbleObserverCocoa : public bookmarks::BookmarkBubbleObserver { |
| 16 public: | 17 public: |
| 17 explicit BookmarkBubbleObserverCocoa(BrowserWindowController* controller); | 18 explicit BookmarkBubbleObserverCocoa(BrowserWindowController* controller); |
| 18 ~BookmarkBubbleObserverCocoa() override; | 19 ~BookmarkBubbleObserverCocoa() override; |
| 19 | 20 |
| 20 // bookmarks::BookmarkBubbleObserver. | 21 // bookmarks::BookmarkBubbleObserver. |
| 21 void OnBookmarkBubbleShown(const bookmarks::BookmarkNode* node) override; | 22 void OnBookmarkBubbleShown(const bookmarks::BookmarkNode* node) override; |
| 22 void OnBookmarkBubbleHidden() override; | 23 void OnBookmarkBubbleHidden() override; |
| 23 | 24 |
| 24 private: | 25 private: |
| 25 BrowserWindowController* controller_; // Weak, owns us. | 26 BrowserWindowController* controller_; // Weak, owns us. |
| 26 base::scoped_nsobject<NSObject> lockOwner_; | 27 base::scoped_nsobject<NSObject> lockOwner_; |
| 27 | 28 |
| 28 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleObserverCocoa); | 29 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleObserverCocoa); |
| 29 }; | 30 }; |
| 30 | 31 |
| 31 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUBBLE_OBSERVER_COCOA_H_ | 32 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUBBLE_OBSERVER_COCOA_H_ |
| OLD | NEW |