OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_BROWSER_WINDOW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ |
6 #define CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ | 6 #define CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool show_history); | 99 bool show_history); |
100 virtual void ShowAppMenu(); | 100 virtual void ShowAppMenu(); |
101 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 101 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
102 bool* is_keyboard_shortcut); | 102 bool* is_keyboard_shortcut); |
103 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 103 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
104 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); | 104 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); |
105 virtual void Cut(); | 105 virtual void Cut(); |
106 virtual void Copy(); | 106 virtual void Copy(); |
107 virtual void Paste(); | 107 virtual void Paste(); |
108 virtual void ToggleTabStripMode(); | 108 virtual void ToggleTabStripMode(); |
| 109 virtual void OpenTabpose(); |
109 | 110 |
110 // Overridden from NotificationObserver | 111 // Overridden from NotificationObserver |
111 virtual void Observe(NotificationType type, | 112 virtual void Observe(NotificationType type, |
112 const NotificationSource& source, | 113 const NotificationSource& source, |
113 const NotificationDetails& details); | 114 const NotificationDetails& details); |
114 | 115 |
115 // Adds the given FindBar cocoa controller to this browser window. | 116 // Adds the given FindBar cocoa controller to this browser window. |
116 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 117 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
117 | 118 |
118 // Returns the cocoa-world BrowserWindowController | 119 // Returns the cocoa-world BrowserWindowController |
119 BrowserWindowController* cocoa_controller() { return controller_; } | 120 BrowserWindowController* cocoa_controller() { return controller_; } |
120 | 121 |
121 protected: | 122 protected: |
122 virtual void DestroyBrowser(); | 123 virtual void DestroyBrowser(); |
123 | 124 |
124 private: | 125 private: |
125 int GetCommandId(const NativeWebKeyboardEvent& event); | 126 int GetCommandId(const NativeWebKeyboardEvent& event); |
126 bool HandleKeyboardEventInternal(NSEvent* event); | 127 bool HandleKeyboardEventInternal(NSEvent* event); |
127 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 128 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
128 | 129 |
129 NotificationRegistrar registrar_; | 130 NotificationRegistrar registrar_; |
130 Browser* browser_; // weak, owned by controller | 131 Browser* browser_; // weak, owned by controller |
131 BrowserWindowController* controller_; // weak, owns us | 132 BrowserWindowController* controller_; // weak, owns us |
132 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; | 133 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; |
133 }; | 134 }; |
134 | 135 |
135 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ | 136 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |