| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 const Extension* app); | 102 const Extension* app); |
| 103 virtual void Cut(); | 103 virtual void Cut(); |
| 104 virtual void Copy(); | 104 virtual void Copy(); |
| 105 virtual void Paste(); | 105 virtual void Paste(); |
| 106 virtual void ToggleTabStripMode(); | 106 virtual void ToggleTabStripMode(); |
| 107 virtual void OpenTabpose(); | 107 virtual void OpenTabpose(); |
| 108 virtual void PrepareForInstant(); | 108 virtual void PrepareForInstant(); |
| 109 virtual void ShowInstant(TabContentsWrapper* preview); | 109 virtual void ShowInstant(TabContentsWrapper* preview); |
| 110 virtual void HideInstant(bool instant_is_active); | 110 virtual void HideInstant(bool instant_is_active); |
| 111 virtual gfx::Rect GetInstantBounds(); | 111 virtual gfx::Rect GetInstantBounds(); |
| 112 virtual void AdjustNavigateParams(browser::NavigateParams* params); |
| 112 | 113 |
| 113 // Overridden from NotificationObserver | 114 // Overridden from NotificationObserver |
| 114 virtual void Observe(NotificationType type, | 115 virtual void Observe(NotificationType type, |
| 115 const NotificationSource& source, | 116 const NotificationSource& source, |
| 116 const NotificationDetails& details); | 117 const NotificationDetails& details); |
| 117 | 118 |
| 118 // Adds the given FindBar cocoa controller to this browser window. | 119 // Adds the given FindBar cocoa controller to this browser window. |
| 119 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 120 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
| 120 | 121 |
| 121 // Returns the cocoa-world BrowserWindowController | 122 // Returns the cocoa-world BrowserWindowController |
| 122 BrowserWindowController* cocoa_controller() { return controller_; } | 123 BrowserWindowController* cocoa_controller() { return controller_; } |
| 123 | 124 |
| 124 protected: | 125 protected: |
| 125 virtual void DestroyBrowser(); | 126 virtual void DestroyBrowser(); |
| 126 | 127 |
| 127 private: | 128 private: |
| 128 int GetCommandId(const NativeWebKeyboardEvent& event); | 129 int GetCommandId(const NativeWebKeyboardEvent& event); |
| 129 bool HandleKeyboardEventInternal(NSEvent* event); | 130 bool HandleKeyboardEventInternal(NSEvent* event); |
| 130 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 131 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 131 void UpdateSidebarForContents(TabContents* tab_contents); | 132 void UpdateSidebarForContents(TabContents* tab_contents); |
| 132 | 133 |
| 133 NotificationRegistrar registrar_; | 134 NotificationRegistrar registrar_; |
| 134 Browser* browser_; // weak, owned by controller | 135 Browser* browser_; // weak, owned by controller |
| 135 BrowserWindowController* controller_; // weak, owns us | 136 BrowserWindowController* controller_; // weak, owns us |
| 136 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; | 137 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; |
| 137 scoped_nsobject<NSString> pending_window_title_; | 138 scoped_nsobject<NSString> pending_window_title_; |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 141 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |