| 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 virtual void ShowAppMenu(); | 99 virtual void ShowAppMenu(); |
| 100 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 100 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 101 bool* is_keyboard_shortcut); | 101 bool* is_keyboard_shortcut); |
| 102 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 102 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 103 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); | 103 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); |
| 104 virtual void Cut(); | 104 virtual void Cut(); |
| 105 virtual void Copy(); | 105 virtual void Copy(); |
| 106 virtual void Paste(); | 106 virtual void Paste(); |
| 107 virtual void ToggleTabStripMode(); | 107 virtual void ToggleTabStripMode(); |
| 108 virtual void OpenTabpose(); | 108 virtual void OpenTabpose(); |
| 109 virtual void ShowMatchPreview(); |
| 110 virtual void HideMatchPreview(); |
| 109 | 111 |
| 110 // Overridden from NotificationObserver | 112 // Overridden from NotificationObserver |
| 111 virtual void Observe(NotificationType type, | 113 virtual void Observe(NotificationType type, |
| 112 const NotificationSource& source, | 114 const NotificationSource& source, |
| 113 const NotificationDetails& details); | 115 const NotificationDetails& details); |
| 114 | 116 |
| 115 // Adds the given FindBar cocoa controller to this browser window. | 117 // Adds the given FindBar cocoa controller to this browser window. |
| 116 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 118 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
| 117 | 119 |
| 118 // Returns the cocoa-world BrowserWindowController | 120 // Returns the cocoa-world BrowserWindowController |
| 119 BrowserWindowController* cocoa_controller() { return controller_; } | 121 BrowserWindowController* cocoa_controller() { return controller_; } |
| 120 | 122 |
| 121 protected: | 123 protected: |
| 122 virtual void DestroyBrowser(); | 124 virtual void DestroyBrowser(); |
| 123 | 125 |
| 124 private: | 126 private: |
| 125 int GetCommandId(const NativeWebKeyboardEvent& event); | 127 int GetCommandId(const NativeWebKeyboardEvent& event); |
| 126 bool HandleKeyboardEventInternal(NSEvent* event); | 128 bool HandleKeyboardEventInternal(NSEvent* event); |
| 127 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 129 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 128 void UpdateSidebarForContents(TabContents* tab_contents); | 130 void UpdateSidebarForContents(TabContents* tab_contents); |
| 129 | 131 |
| 130 NotificationRegistrar registrar_; | 132 NotificationRegistrar registrar_; |
| 131 Browser* browser_; // weak, owned by controller | 133 Browser* browser_; // weak, owned by controller |
| 132 BrowserWindowController* controller_; // weak, owns us | 134 BrowserWindowController* controller_; // weak, owns us |
| 133 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; | 135 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ | 138 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |