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/window_win.h" | 5 #include "views/window/window_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include "app/keyboard_code_conversion_win.h" | 10 #include "app/keyboard_code_conversion_win.h" |
11 #include "app/theme_provider.h" | 11 #include "app/theme_provider.h" |
| 12 #include "app/win/hwnd_util.h" |
12 #include "app/win_util.h" | 13 #include "app/win_util.h" |
13 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
14 #include "base/win_util.h" | |
15 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
16 #include "gfx/canvas_skia_paint.h" | 16 #include "gfx/canvas_skia_paint.h" |
17 #include "gfx/font.h" | 17 #include "gfx/font.h" |
18 #include "gfx/icon_util.h" | 18 #include "gfx/icon_util.h" |
19 #include "gfx/path.h" | 19 #include "gfx/path.h" |
20 #include "views/accessibility/view_accessibility.h" | 20 #include "views/accessibility/view_accessibility.h" |
21 #include "views/widget/root_view.h" | 21 #include "views/widget/root_view.h" |
22 #include "views/window/client_view.h" | 22 #include "views/window/client_view.h" |
23 #include "views/window/custom_frame_view.h" | 23 #include "views/window/custom_frame_view.h" |
24 #include "views/window/native_frame_view.h" | 24 #include "views/window/native_frame_view.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 is_modal_ = window_delegate_->IsModal(); | 539 is_modal_ = window_delegate_->IsModal(); |
540 if (is_modal_) | 540 if (is_modal_) |
541 BecomeModal(); | 541 BecomeModal(); |
542 | 542 |
543 if (window_style() == 0) | 543 if (window_style() == 0) |
544 set_window_style(CalculateWindowStyle()); | 544 set_window_style(CalculateWindowStyle()); |
545 if (window_ex_style() == 0) | 545 if (window_ex_style() == 0) |
546 set_window_ex_style(CalculateWindowExStyle()); | 546 set_window_ex_style(CalculateWindowExStyle()); |
547 | 547 |
548 WidgetWin::Init(parent, bounds); | 548 WidgetWin::Init(parent, bounds); |
549 win_util::SetWindowUserData(GetNativeView(), this); | 549 app::win::SetWindowUserData(GetNativeView(), this); |
550 | 550 |
551 // Create the ClientView, add it to the NonClientView and add the | 551 // Create the ClientView, add it to the NonClientView and add the |
552 // NonClientView to the RootView. This will cause everything to be parented. | 552 // NonClientView to the RootView. This will cause everything to be parented. |
553 non_client_view_->set_client_view(window_delegate_->CreateClientView(this)); | 553 non_client_view_->set_client_view(window_delegate_->CreateClientView(this)); |
554 WidgetWin::SetContentsView(non_client_view_); | 554 WidgetWin::SetContentsView(non_client_view_); |
555 | 555 |
556 UpdateWindowTitle(); | 556 UpdateWindowTitle(); |
557 UpdateAccessibleRole(); | 557 UpdateAccessibleRole(); |
558 UpdateAccessibleState(); | 558 UpdateAccessibleState(); |
559 | 559 |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 Window::CloseSecondaryWidget(root_view->GetWidget()); | 1526 Window::CloseSecondaryWidget(root_view->GetWidget()); |
1527 return TRUE; | 1527 return TRUE; |
1528 } | 1528 } |
1529 } // namespace | 1529 } // namespace |
1530 | 1530 |
1531 void Window::CloseAllSecondaryWindows() { | 1531 void Window::CloseAllSecondaryWindows() { |
1532 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); | 1532 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); |
1533 } | 1533 } |
1534 | 1534 |
1535 } // namespace views | 1535 } // namespace views |
OLD | NEW |