| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 12 #include "chrome/browser/prefs/pref_change_registrar.h" | 12 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 13 #include "chrome/browser/ui/browser_window.h" | 13 #include "chrome/browser/ui/browser_window.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 15 #include "ui/base/ui_base_types.h" | 15 #include "ui/base/ui_base_types.h" |
| 16 | 16 |
| 17 class Browser; | 17 class Browser; |
| 18 @class BrowserWindowController; | 18 @class BrowserWindowController; |
| 19 @class FindBarCocoaController; | 19 @class FindBarCocoaController; |
| 20 @class NSEvent; | 20 @class NSEvent; |
| 21 @class NSMenu; | 21 @class NSMenu; |
| 22 @class NSWindow; | 22 @class NSWindow; |
| 23 | 23 |
| 24 namespace extensions { |
| 25 class Extension; |
| 26 } |
| 27 |
| 24 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and | 28 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and |
| 25 // the Cocoa NSWindow. Cross-platform code will interact with this object when | 29 // the Cocoa NSWindow. Cross-platform code will interact with this object when |
| 26 // it needs to manipulate the window. | 30 // it needs to manipulate the window. |
| 27 | 31 |
| 28 class BrowserWindowCocoa : public BrowserWindow, | 32 class BrowserWindowCocoa : public BrowserWindow, |
| 29 public content::NotificationObserver { | 33 public content::NotificationObserver { |
| 30 public: | 34 public: |
| 31 BrowserWindowCocoa(Browser* browser, | 35 BrowserWindowCocoa(Browser* browser, |
| 32 BrowserWindowController* controller); | 36 BrowserWindowController* controller); |
| 33 virtual ~BrowserWindowCocoa(); | 37 virtual ~BrowserWindowCocoa(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 bool show_history) OVERRIDE; | 119 bool show_history) OVERRIDE; |
| 116 virtual void ShowAppMenu() OVERRIDE; | 120 virtual void ShowAppMenu() OVERRIDE; |
| 117 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 121 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 118 bool* is_keyboard_shortcut) OVERRIDE; | 122 bool* is_keyboard_shortcut) OVERRIDE; |
| 119 virtual void HandleKeyboardEvent( | 123 virtual void HandleKeyboardEvent( |
| 120 const NativeWebKeyboardEvent& event) OVERRIDE; | 124 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 121 virtual void ShowCreateWebAppShortcutsDialog( | 125 virtual void ShowCreateWebAppShortcutsDialog( |
| 122 TabContentsWrapper* tab_contents) OVERRIDE; | 126 TabContentsWrapper* tab_contents) OVERRIDE; |
| 123 virtual void ShowCreateChromeAppShortcutsDialog( | 127 virtual void ShowCreateChromeAppShortcutsDialog( |
| 124 Profile* profile, | 128 Profile* profile, |
| 125 const Extension* app) OVERRIDE; | 129 const extensions::Extension* app) OVERRIDE; |
| 126 virtual void Cut() OVERRIDE; | 130 virtual void Cut() OVERRIDE; |
| 127 virtual void Copy() OVERRIDE; | 131 virtual void Copy() OVERRIDE; |
| 128 virtual void Paste() OVERRIDE; | 132 virtual void Paste() OVERRIDE; |
| 129 virtual void OpenTabpose() OVERRIDE; | 133 virtual void OpenTabpose() OVERRIDE; |
| 130 virtual void EnterPresentationMode( | 134 virtual void EnterPresentationMode( |
| 131 const GURL& url, | 135 const GURL& url, |
| 132 FullscreenExitBubbleType bubble_type) OVERRIDE; | 136 FullscreenExitBubbleType bubble_type) OVERRIDE; |
| 133 virtual void ExitPresentationMode() OVERRIDE; | 137 virtual void ExitPresentationMode() OVERRIDE; |
| 134 virtual bool InPresentationMode() OVERRIDE; | 138 virtual bool InPresentationMode() OVERRIDE; |
| 135 virtual void ShowInstant(TabContentsWrapper* preview) OVERRIDE; | 139 virtual void ShowInstant(TabContentsWrapper* preview) OVERRIDE; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 163 PrefChangeRegistrar pref_change_registrar_; | 167 PrefChangeRegistrar pref_change_registrar_; |
| 164 Browser* browser_; // weak, owned by controller | 168 Browser* browser_; // weak, owned by controller |
| 165 BrowserWindowController* controller_; // weak, owns us | 169 BrowserWindowController* controller_; // weak, owns us |
| 166 base::WeakPtrFactory<Browser> confirm_close_factory_; | 170 base::WeakPtrFactory<Browser> confirm_close_factory_; |
| 167 scoped_nsobject<NSString> pending_window_title_; | 171 scoped_nsobject<NSString> pending_window_title_; |
| 168 ui::WindowShowState initial_show_state_; | 172 ui::WindowShowState initial_show_state_; |
| 169 NSInteger attention_request_id_; // identifier from requestUserAttention | 173 NSInteger attention_request_id_; // identifier from requestUserAttention |
| 170 }; | 174 }; |
| 171 | 175 |
| 172 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 176 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |