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

Side by Side Diff: views/views_delegate.h

Issue 7748036: Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
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 VIEWS_VIEWS_DELEGATE_H_ 5 #ifndef VIEWS_VIEWS_DELEGATE_H_
6 #define VIEWS_VIEWS_DELEGATE_H_ 6 #define VIEWS_VIEWS_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 #include <windows.h> 11 #include <windows.h>
12 #endif 12 #endif
13 13
14 #include "ui/base/accessibility/accessibility_types.h" 14 #include "ui/base/accessibility/accessibility_types.h"
15 #include "ui/base/ui_base_types.h"
15 #include "views/views_export.h" 16 #include "views/views_export.h"
16 17
17 namespace gfx { 18 namespace gfx {
18 class Rect; 19 class Rect;
19 } 20 }
20 21
21 namespace ui { 22 namespace ui {
22 class Clipboard; 23 class Clipboard;
23 } 24 }
24 25
(...skipping 14 matching lines...) Expand all
39 40
40 // Gets the clipboard. 41 // Gets the clipboard.
41 virtual ui::Clipboard* GetClipboard() const = 0; 42 virtual ui::Clipboard* GetClipboard() const = 0;
42 43
43 // Returns the View that all synthetic widgets created without a specified 44 // Returns the View that all synthetic widgets created without a specified
44 // parent will be parented to if they do not specify a parent in their 45 // parent will be parented to if they do not specify a parent in their
45 // InitParams, or NULL if they should have no parent. 46 // InitParams, or NULL if they should have no parent.
46 // TODO(beng): perhaps this should be a Widget. 47 // TODO(beng): perhaps this should be a Widget.
47 virtual View* GetDefaultParentView() = 0; 48 virtual View* GetDefaultParentView() = 0;
48 49
49 // Saves the position, size and maximized state for the window with the 50 // Saves the position, size and "show" state for the window with the
50 // specified name. 51 // specified name.
51 virtual void SaveWindowPlacement(const Widget* widget, 52 virtual void SaveWindowPlacement(const Widget* widget,
52 const std::wstring& window_name, 53 const std::wstring& window_name,
53 const gfx::Rect& bounds, 54 const gfx::Rect& bounds,
54 bool maximized) = 0; 55 ui::WindowShowState show_state) = 0;
55 56
56 // Retrieves the saved position and size for the window with the specified 57 // Retrieves the saved position and size for the window with the specified
57 // name. 58 // name.
58 virtual bool GetSavedWindowBounds(const std::wstring& window_name, 59 virtual bool GetSavedWindowBounds(const std::wstring& window_name,
59 gfx::Rect* bounds) const = 0; 60 gfx::Rect* bounds) const = 0;
60 61
61 // Retrieves the saved maximized state for the window with the specified 62 // Retrieves the saved "show" state for the window with the specified
62 // name. 63 // name.
63 virtual bool GetSavedMaximizedState(const std::wstring& window_name, 64 virtual bool GetSavedWindowShowState(
sky 2011/08/26 16:26:20 Since you're here, is it possible to combine GetSa
dhollowa 2011/08/26 22:13:50 Done. I've gone with |GetSavedWindowPlacement| th
64 bool* maximized) const = 0; 65 const std::wstring& window_name,
66 ui::WindowShowState* show_state) const = 0;
65 67
66 virtual void NotifyAccessibilityEvent( 68 virtual void NotifyAccessibilityEvent(
67 views::View* view, ui::AccessibilityTypes::Event event_type) = 0; 69 views::View* view, ui::AccessibilityTypes::Event event_type) = 0;
68 70
69 // For accessibility, notify the delegate that a menu item was focused 71 // For accessibility, notify the delegate that a menu item was focused
70 // so that alternate feedback (speech / magnified text) can be provided. 72 // so that alternate feedback (speech / magnified text) can be provided.
71 virtual void NotifyMenuItemFocused( 73 virtual void NotifyMenuItemFocused(
72 const std::wstring& menu_name, 74 const std::wstring& menu_name,
73 const std::wstring& menu_item_name, 75 const std::wstring& menu_item_name,
74 int item_index, 76 int item_index,
(...skipping 13 matching lines...) Expand all
88 // Converts views::Event::flags to a WindowOpenDisposition. 90 // Converts views::Event::flags to a WindowOpenDisposition.
89 virtual int GetDispositionForEvent(int event_flags) = 0; 91 virtual int GetDispositionForEvent(int event_flags) = 0;
90 92
91 // The active ViewsDelegate used by the views system. 93 // The active ViewsDelegate used by the views system.
92 static ViewsDelegate* views_delegate; 94 static ViewsDelegate* views_delegate;
93 }; 95 };
94 96
95 } // namespace views 97 } // namespace views
96 98
97 #endif // VIEWS_VIEWS_DELEGATE_H_ 99 #endif // VIEWS_VIEWS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698