| 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_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 const NativeWebKeyboardEvent& event, | 49 const NativeWebKeyboardEvent& event, |
| 50 bool* is_keyboard_shortcut) OVERRIDE; | 50 bool* is_keyboard_shortcut) OVERRIDE; |
| 51 virtual void HandlePanelKeyboardEvent( | 51 virtual void HandlePanelKeyboardEvent( |
| 52 const NativeWebKeyboardEvent& event) OVERRIDE; | 52 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 53 virtual Browser* GetPanelBrowser() const OVERRIDE; | 53 virtual Browser* GetPanelBrowser() const OVERRIDE; |
| 54 virtual void DestroyPanelBrowser() OVERRIDE; | 54 virtual void DestroyPanelBrowser() OVERRIDE; |
| 55 | 55 |
| 56 Panel* panel() { return panel_.get(); } | 56 Panel* panel() { return panel_.get(); } |
| 57 Browser* browser() const { return browser_.get(); } | 57 Browser* browser() const { return browser_.get(); } |
| 58 | 58 |
| 59 // Callback from PanelWindowControllerCocoa that native window was actually |
| 60 // closed. The window may not close right away because of onbeforeunload |
| 61 // handlers. |
| 62 void didCloseNativeWindow(); |
| 63 |
| 59 private: | 64 private: |
| 60 friend class PanelBrowserWindowCocoaTest; | 65 friend class PanelBrowserWindowCocoaTest; |
| 61 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, CreateClose); | 66 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, CreateClose); |
| 62 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, NativeBounds); | 67 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, NativeBounds); |
| 63 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewCreate); | 68 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewCreate); |
| 64 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewSizing); | 69 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewSizing); |
| 65 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewClose); | 70 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewClose); |
| 66 | 71 |
| 67 bool isClosed(); | 72 bool isClosed(); |
| 68 | 73 |
| 69 scoped_ptr<Browser> browser_; | 74 scoped_ptr<Browser> browser_; |
| 70 scoped_ptr<Panel> panel_; | 75 scoped_ptr<Panel> panel_; |
| 71 gfx::Rect bounds_; | 76 gfx::Rect bounds_; |
| 72 PanelWindowControllerCocoa* controller_; // Weak, owns us. | 77 PanelWindowControllerCocoa* controller_; // Weak, owns us. |
| 73 bool is_shown_; // Panel is hidden on creation, Show() changes that forever. | 78 bool is_shown_; // Panel is hidden on creation, Show() changes that forever. |
| 74 bool has_find_bar_; // Find bar should only be created once per panel. | 79 bool has_find_bar_; // Find bar should only be created once per panel. |
| 75 | 80 |
| 76 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowCocoa); | 81 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowCocoa); |
| 77 }; | 82 }; |
| 78 | 83 |
| 79 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ | 84 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |