OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/window/non_client_view.h" | 5 #include "views/window/non_client_view.h" |
6 | 6 |
7 #include "app/theme_provider.h" | 7 #include "app/theme_provider.h" |
8 #include "views/widget/root_view.h" | 8 #include "views/widget/root_view.h" |
9 #include "views/widget/widget.h" | 9 #include "views/widget/widget.h" |
10 #include "views/window/window.h" | 10 #include "views/window/window.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bool NonClientView::CanClose() const { | 54 bool NonClientView::CanClose() const { |
55 return client_view_->CanClose(); | 55 return client_view_->CanClose(); |
56 } | 56 } |
57 | 57 |
58 void NonClientView::WindowClosing() { | 58 void NonClientView::WindowClosing() { |
59 client_view_->WindowClosing(); | 59 client_view_->WindowClosing(); |
60 } | 60 } |
61 | 61 |
62 void NonClientView::UpdateFrame() { | 62 void NonClientView::UpdateFrame() { |
63 SetFrameView(frame_->CreateFrameViewForWindow()); | 63 SetFrameView(frame_->CreateFrameViewForWindow()); |
64 GetRootView()->ThemeChanged(); | 64 GetRootView()->NotifyThemeChanged(); |
65 Layout(); | 65 Layout(); |
66 SchedulePaint(); | 66 SchedulePaint(); |
67 frame_->UpdateFrameAfterFrameChange(); | 67 frame_->UpdateFrameAfterFrameChange(); |
68 } | 68 } |
69 | 69 |
70 bool NonClientView::UseNativeFrame() const { | 70 bool NonClientView::UseNativeFrame() const { |
71 if (frame_view_.get()) { | 71 if (frame_view_.get()) { |
72 // The frame view may always require a native frame, e.g. popups on Vista+ | 72 // The frame view may always require a native frame, e.g. popups on Vista+ |
73 // when themes are active. | 73 // when themes are active. |
74 if (frame_view_->AlwaysUseNativeFrame()) | 74 if (frame_view_->AlwaysUseNativeFrame()) |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 bool NonClientFrameView::ShouldPaintAsActive() const { | 252 bool NonClientFrameView::ShouldPaintAsActive() const { |
253 return GetWindow()->IsActive() || paint_as_active_; | 253 return GetWindow()->IsActive() || paint_as_active_; |
254 } | 254 } |
255 | 255 |
256 bool NonClientFrameView::GetAccessibleRole(AccessibilityTypes::Role* role) { | 256 bool NonClientFrameView::GetAccessibleRole(AccessibilityTypes::Role* role) { |
257 *role = AccessibilityTypes::ROLE_WINDOW; | 257 *role = AccessibilityTypes::ROLE_WINDOW; |
258 return true; | 258 return true; |
259 } | 259 } |
260 | 260 |
261 } // namespace views | 261 } // namespace views |
OLD | NEW |