Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1003)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.h

Issue 7621061: Restoring a session should restore window minimization state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Mark's comments. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "chrome/browser/bookmarks/bookmark_model.h" 11 #include "chrome/browser/bookmarks/bookmark_model.h"
12 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
13 #include "content/common/notification_registrar.h" 13 #include "content/common/notification_registrar.h"
14 14
15 class Browser; 15 class Browser;
16 @class BrowserWindowController; 16 @class BrowserWindowController;
17 @class FindBarCocoaController; 17 @class FindBarCocoaController;
18 @class NSEvent; 18 @class NSEvent;
19 @class NSMenu; 19 @class NSMenu;
20 @class NSWindow; 20 @class NSWindow;
21 21
22 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and 22 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and
23 // the Cocoa NSWindow. Cross-platform code will interact with this object when 23 // the Cocoa NSWindow. Cross-platform code will interact with this object when
24 // it needs to manipulate the window. 24 // it needs to manipulate the window.
25 25
26 class BrowserWindowCocoa : public BrowserWindow, 26 class BrowserWindowCocoa : public BrowserWindow,
27 public NotificationObserver { 27 public NotificationObserver {
28 public: 28 public:
29 BrowserWindowCocoa(Browser* browser, 29 BrowserWindowCocoa(Browser* browser,
30 BrowserWindowController* controller, 30 BrowserWindowController* controller);
31 NSWindow* window);
32 virtual ~BrowserWindowCocoa(); 31 virtual ~BrowserWindowCocoa();
33 32
34 // Overridden from BrowserWindow 33 // Overridden from BrowserWindow
35 virtual void Show(); 34 virtual void Show();
36 virtual void ShowInactive(); 35 virtual void ShowInactive();
37 virtual void SetBounds(const gfx::Rect& bounds); 36 virtual void SetBounds(const gfx::Rect& bounds);
38 virtual void Close(); 37 virtual void Close();
39 virtual void Activate(); 38 virtual void Activate();
40 virtual void Deactivate(); 39 virtual void Deactivate();
41 virtual bool IsActive() const; 40 virtual bool IsActive() const;
42 virtual void FlashFrame(); 41 virtual void FlashFrame();
43 virtual gfx::NativeWindow GetNativeHandle(); 42 virtual gfx::NativeWindow GetNativeHandle();
44 virtual BrowserWindowTesting* GetBrowserWindowTesting(); 43 virtual BrowserWindowTesting* GetBrowserWindowTesting();
45 virtual StatusBubble* GetStatusBubble(); 44 virtual StatusBubble* GetStatusBubble();
46 virtual void ToolbarSizeChanged(bool is_animating); 45 virtual void ToolbarSizeChanged(bool is_animating);
47 virtual void UpdateTitleBar(); 46 virtual void UpdateTitleBar();
48 virtual void BookmarkBarStateChanged( 47 virtual void BookmarkBarStateChanged(
49 BookmarkBar::AnimateChangeType change_type); 48 BookmarkBar::AnimateChangeType change_type);
50 virtual void UpdateDevTools(); 49 virtual void UpdateDevTools();
51 virtual void UpdateLoadingAnimations(bool should_animate); 50 virtual void UpdateLoadingAnimations(bool should_animate);
52 virtual void SetStarredState(bool is_starred); 51 virtual void SetStarredState(bool is_starred);
53 virtual gfx::Rect GetRestoredBounds() const; 52 virtual gfx::Rect GetRestoredBounds() const;
54 virtual gfx::Rect GetBounds() const; 53 virtual gfx::Rect GetBounds() const;
55 virtual bool IsMaximized() const; 54 virtual bool IsMaximized() const;
55 virtual bool IsMinimized() const;
56 virtual void SetFullscreen(bool fullscreen); 56 virtual void SetFullscreen(bool fullscreen);
57 virtual bool IsFullscreen() const; 57 virtual bool IsFullscreen() const;
58 virtual bool IsFullscreenBubbleVisible() const; 58 virtual bool IsFullscreenBubbleVisible() const;
59 virtual LocationBar* GetLocationBar() const; 59 virtual LocationBar* GetLocationBar() const;
60 virtual void SetFocusToLocationBar(bool select_all); 60 virtual void SetFocusToLocationBar(bool select_all);
61 virtual void UpdateReloadStopState(bool is_loading, bool force); 61 virtual void UpdateReloadStopState(bool is_loading, bool force);
62 virtual void UpdateToolbar(TabContentsWrapper* contents, 62 virtual void UpdateToolbar(TabContentsWrapper* contents,
63 bool should_restore_state); 63 bool should_restore_state);
64 virtual void FocusToolbar(); 64 virtual void FocusToolbar();
65 virtual void FocusAppMenu(); 65 virtual void FocusAppMenu();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void UpdateSidebarForContents(TabContents* tab_contents); 138 void UpdateSidebarForContents(TabContents* tab_contents);
139 139
140 NotificationRegistrar registrar_; 140 NotificationRegistrar registrar_;
141 Browser* browser_; // weak, owned by controller 141 Browser* browser_; // weak, owned by controller
142 BrowserWindowController* controller_; // weak, owns us 142 BrowserWindowController* controller_; // weak, owns us
143 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; 143 ScopedRunnableMethodFactory<Browser> confirm_close_factory_;
144 scoped_nsobject<NSString> pending_window_title_; 144 scoped_nsobject<NSString> pending_window_title_;
145 }; 145 };
146 146
147 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ 147 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698