| 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" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 // now. | 410 // now. |
| 411 non_client_view_->Layout(); | 411 non_client_view_->Layout(); |
| 412 | 412 |
| 413 // Update the native frame's text. We do this regardless of whether or not | 413 // Update the native frame's text. We do this regardless of whether or not |
| 414 // the native frame is being used, since this also updates the taskbar, etc. | 414 // the native frame is being used, since this also updates the taskbar, etc. |
| 415 std::wstring window_title; | 415 std::wstring window_title; |
| 416 if (IsAccessibleWidget()) | 416 if (IsAccessibleWidget()) |
| 417 window_title = window_delegate_->GetAccessibleWindowTitle(); | 417 window_title = window_delegate_->GetAccessibleWindowTitle(); |
| 418 else | 418 else |
| 419 window_title = window_delegate_->GetWindowTitle(); | 419 window_title = window_delegate_->GetWindowTitle(); |
| 420 std::wstring localized_text; | 420 base::i18n::AdjustStringForLocaleDirection(&window_title); |
| 421 if (base::i18n::AdjustStringForLocaleDirection(window_title, &localized_text)) | |
| 422 window_title.assign(localized_text); | |
| 423 SetWindowText(GetNativeView(), window_title.c_str()); | 421 SetWindowText(GetNativeView(), window_title.c_str()); |
| 424 | 422 |
| 425 // Also update the accessibility name. | 423 // Also update the accessibility name. |
| 426 UpdateAccessibleName(window_title); | 424 UpdateAccessibleName(window_title); |
| 427 } | 425 } |
| 428 | 426 |
| 429 void WindowWin::UpdateWindowIcon() { | 427 void WindowWin::UpdateWindowIcon() { |
| 430 // If the non-client view is rendering its own icon, we need to tell it to | 428 // If the non-client view is rendering its own icon, we need to tell it to |
| 431 // repaint. | 429 // repaint. |
| 432 non_client_view_->SchedulePaint(); | 430 non_client_view_->SchedulePaint(); |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 Window::CloseSecondaryWidget(root_view->GetWidget()); | 1526 Window::CloseSecondaryWidget(root_view->GetWidget()); |
| 1529 return TRUE; | 1527 return TRUE; |
| 1530 } | 1528 } |
| 1531 } // namespace | 1529 } // namespace |
| 1532 | 1530 |
| 1533 void Window::CloseAllSecondaryWindows() { | 1531 void Window::CloseAllSecondaryWindows() { |
| 1534 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); | 1532 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); |
| 1535 } | 1533 } |
| 1536 | 1534 |
| 1537 } // namespace views | 1535 } // namespace views |
| OLD | NEW |