| 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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 12 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 13 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "content/common/notification_registrar.h" | 14 #include "content/common/notification_registrar.h" |
| 14 #include "ui/base/ui_base_types.h" | 15 #include "ui/base/ui_base_types.h" |
| 15 | 16 |
| 16 class Browser; | 17 class Browser; |
| 17 @class BrowserWindowController; | 18 @class BrowserWindowController; |
| 18 @class FindBarCocoaController; | 19 @class FindBarCocoaController; |
| 19 @class NSEvent; | 20 @class NSEvent; |
| 20 @class NSMenu; | 21 @class NSMenu; |
| 21 @class NSWindow; | 22 @class NSWindow; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 BrowserWindowController* cocoa_controller() { return controller_; } | 130 BrowserWindowController* cocoa_controller() { return controller_; } |
| 130 | 131 |
| 131 protected: | 132 protected: |
| 132 virtual void DestroyBrowser(); | 133 virtual void DestroyBrowser(); |
| 133 | 134 |
| 134 private: | 135 private: |
| 135 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 136 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 136 void UpdateSidebarForContents(TabContents* tab_contents); | 137 void UpdateSidebarForContents(TabContents* tab_contents); |
| 137 | 138 |
| 138 NotificationRegistrar registrar_; | 139 NotificationRegistrar registrar_; |
| 140 PrefChangeRegistrar pref_change_registrar_; |
| 139 Browser* browser_; // weak, owned by controller | 141 Browser* browser_; // weak, owned by controller |
| 140 BrowserWindowController* controller_; // weak, owns us | 142 BrowserWindowController* controller_; // weak, owns us |
| 141 base::WeakPtrFactory<Browser> confirm_close_factory_; | 143 base::WeakPtrFactory<Browser> confirm_close_factory_; |
| 142 scoped_nsobject<NSString> pending_window_title_; | 144 scoped_nsobject<NSString> pending_window_title_; |
| 143 ui::WindowShowState initial_show_state_; | 145 ui::WindowShowState initial_show_state_; |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 148 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |