OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
8 #include "chrome/browser/browser_window.h" | 8 #include "chrome/browser/browser_window.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/common/notification_registrar.h" | 10 #include "chrome/common/notification_registrar.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 gfx::NativeWindow parent_window); | 84 gfx::NativeWindow parent_window); |
85 virtual void UserChangedTheme(); | 85 virtual void UserChangedTheme(); |
86 virtual int GetExtraRenderViewHeight() const; | 86 virtual int GetExtraRenderViewHeight() const; |
87 virtual void TabContentsFocused(TabContents* tab_contents); | 87 virtual void TabContentsFocused(TabContents* tab_contents); |
88 virtual void ShowPageInfo(Profile* profile, | 88 virtual void ShowPageInfo(Profile* profile, |
89 const GURL& url, | 89 const GURL& url, |
90 const NavigationEntry::SSLStatus& ssl, | 90 const NavigationEntry::SSLStatus& ssl, |
91 bool show_history); | 91 bool show_history); |
92 virtual void ShowPageMenu(); | 92 virtual void ShowPageMenu(); |
93 virtual void ShowAppMenu(); | 93 virtual void ShowAppMenu(); |
94 virtual int GetCommandId(const NativeWebKeyboardEvent& event); | 94 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 95 bool* is_keyboard_shortcut); |
| 96 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
95 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); | 97 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); |
96 | 98 |
97 // Overridden from NotificationObserver | 99 // Overridden from NotificationObserver |
98 virtual void Observe(NotificationType type, | 100 virtual void Observe(NotificationType type, |
99 const NotificationSource& source, | 101 const NotificationSource& source, |
100 const NotificationDetails& details); | 102 const NotificationDetails& details); |
101 | 103 |
102 // Adds the given FindBar cocoa controller to this browser window. | 104 // Adds the given FindBar cocoa controller to this browser window. |
103 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 105 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
104 | 106 |
105 // Returns the cocoa-world BrowserWindowController | 107 // Returns the cocoa-world BrowserWindowController |
106 BrowserWindowController* cocoa_controller() { return controller_; } | 108 BrowserWindowController* cocoa_controller() { return controller_; } |
107 | 109 |
108 protected: | 110 protected: |
109 virtual void DestroyBrowser(); | 111 virtual void DestroyBrowser(); |
110 | 112 |
111 private: | 113 private: |
| 114 int GetCommandId(const NativeWebKeyboardEvent& event); |
| 115 bool HandleKeyboardEventInternal(NSEvent* event); |
| 116 |
112 NotificationRegistrar registrar_; | 117 NotificationRegistrar registrar_; |
113 NSWindow* window_; // weak, owned by controller | 118 NSWindow* window_; // weak, owned by controller |
114 Browser* browser_; // weak, owned by controller | 119 Browser* browser_; // weak, owned by controller |
115 BrowserWindowController* controller_; // weak, owns us | 120 BrowserWindowController* controller_; // weak, owns us |
116 }; | 121 }; |
117 | 122 |
118 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ | 123 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |