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/task.h" | 10 #include "base/task.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Adds the given FindBar cocoa controller to this browser window. | 125 // Adds the given FindBar cocoa controller to this browser window. |
126 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 126 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
127 | 127 |
128 // Returns the cocoa-world BrowserWindowController | 128 // Returns the cocoa-world BrowserWindowController |
129 BrowserWindowController* cocoa_controller() { return controller_; } | 129 BrowserWindowController* cocoa_controller() { return controller_; } |
130 | 130 |
131 protected: | 131 protected: |
132 virtual void DestroyBrowser(); | 132 virtual void DestroyBrowser(); |
133 | 133 |
134 private: | 134 private: |
135 int GetCommandId(const NativeWebKeyboardEvent& event); | |
136 bool HandleKeyboardEventInternal(NSEvent* event); | |
137 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 135 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
138 void UpdateSidebarForContents(TabContents* tab_contents); | 136 void UpdateSidebarForContents(TabContents* tab_contents); |
139 | 137 |
140 NotificationRegistrar registrar_; | 138 NotificationRegistrar registrar_; |
141 Browser* browser_; // weak, owned by controller | 139 Browser* browser_; // weak, owned by controller |
142 BrowserWindowController* controller_; // weak, owns us | 140 BrowserWindowController* controller_; // weak, owns us |
143 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; | 141 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; |
144 scoped_nsobject<NSString> pending_window_title_; | 142 scoped_nsobject<NSString> pending_window_title_; |
145 }; | 143 }; |
146 | 144 |
147 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 145 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |