OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Overridden from SearchModelObserver: | 172 // Overridden from SearchModelObserver: |
173 void ModelChanged(const SearchModel::State& old_state, | 173 void ModelChanged(const SearchModel::State& old_state, |
174 const SearchModel::State& new_state) override; | 174 const SearchModel::State& new_state) override; |
175 | 175 |
176 // Adds the given FindBar cocoa controller to this browser window. | 176 // Adds the given FindBar cocoa controller to this browser window. |
177 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 177 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
178 | 178 |
179 // Returns the cocoa-world BrowserWindowController | 179 // Returns the cocoa-world BrowserWindowController |
180 BrowserWindowController* cocoa_controller() { return controller_; } | 180 BrowserWindowController* cocoa_controller() { return controller_; } |
181 | 181 |
| 182 // Handle Sidebar |
| 183 void ShowSidebar(content::WebContents* sidebar_contents); |
| 184 void HideSidebar(); |
| 185 |
182 protected: | 186 protected: |
183 void DestroyBrowser() override; | 187 void DestroyBrowser() override; |
184 | 188 |
185 private: | 189 private: |
186 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 190 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 191 void UpdateSidebarForContents(content::WebContents* sidebar_contents); |
187 | 192 |
188 Browser* browser_; // weak, owned by controller | 193 Browser* browser_; // weak, owned by controller |
189 BrowserWindowController* controller_; // weak, owns us | 194 BrowserWindowController* controller_; // weak, owns us |
190 base::scoped_nsobject<NSString> pending_window_title_; | 195 base::scoped_nsobject<NSString> pending_window_title_; |
191 ui::WindowShowState initial_show_state_; | 196 ui::WindowShowState initial_show_state_; |
192 NSInteger attention_request_id_; // identifier from requestUserAttention | 197 NSInteger attention_request_id_; // identifier from requestUserAttention |
193 }; | 198 }; |
194 | 199 |
195 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 200 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |