blob: 3a143355a20c02fc7c85118311658630f62b41b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "views/window/window.h"
#include "base/string_util.h"
#include "ui/base/l10n/l10n_font_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "views/widget/widget.h"
namespace views {
////////////////////////////////////////////////////////////////////////////////
// Window, public:
Window::Window() : native_window_(NULL) {
}
Window::~Window() {
}
// static
int Window::GetLocalizedContentsWidth(int col_resource_id) {
return ui::GetLocalizedContentsWidthForFont(col_resource_id,
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont));
}
// static
int Window::GetLocalizedContentsHeight(int row_resource_id) {
return ui::GetLocalizedContentsHeightForFont(row_resource_id,
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont));
}
// static
gfx::Size Window::GetLocalizedContentsSize(int col_resource_id,
int row_resource_id) {
return gfx::Size(GetLocalizedContentsWidth(col_resource_id),
GetLocalizedContentsHeight(row_resource_id));
}
// static
void Window::CloseSecondaryWidget(Widget* widget) {
if (!widget)
return;
// Close widget if it's identified as a secondary window.
Window* window = widget->GetWindow();
if (window) {
if (!window->IsAppWindow())
window->Close();
} else {
// If it's not a Window, then close it anyway since it probably is
// secondary.
widget->Close();
}
}
gfx::Rect Window::GetBounds() const {
return gfx::Rect();
}
gfx::Rect Window::GetNormalBounds() const {
return gfx::Rect();
}
void Window::SetWindowBounds(const gfx::Rect& bounds,
gfx::NativeWindow other_window) {
}
void Window::Show() {
}
void Window::HideWindow() {
}
void Window::SetNativeWindowProperty(const char* name, void* value) {
}
void* Window::GetNativeWindowProperty(const char* name) {
return NULL;
}
void Window::Activate() {
}
void Window::Deactivate() {
}
void Window::Close() {
}
void Window::Maximize() {
}
void Window::Minimize() {
}
void Window::Restore() {
}
bool Window::IsActive() const {
return false;
}
bool Window::IsVisible() const {
return false;
}
bool Window::IsMaximized() const {
return false;
}
bool Window::IsMinimized() const {
return false;
}
void Window::SetFullscreen(bool fullscreen) {
}
bool Window::IsFullscreen() const {
return false;
}
void Window::SetUseDragFrame(bool use_drag_frame) {
}
bool Window::IsAppWindow() const {
return false;
}
void Window::EnableClose(bool enable) {
}
void Window::UpdateWindowTitle() {
}
void Window::UpdateWindowIcon() {
}
void Window::SetIsAlwaysOnTop(bool always_on_top) {
}
NonClientFrameView* Window::CreateFrameViewForWindow() {
return NULL;
}
void Window::UpdateFrameAfterFrameChange() {
}
WindowDelegate* Window::GetDelegate() const {
return NULL;
}
NonClientView* Window::GetNonClientView() const {
return NULL;
}
ClientView* Window::GetClientView() const {
return NULL;
}
gfx::NativeWindow Window::GetNativeWindow() const {
return NULL;
}
bool Window::ShouldUseNativeFrame() const {
return false;
}
void Window::FrameTypeChanged() {
}
} // namespace views
|