OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/widget/widget.h" | 5 #include "ui/views/widget/widget.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "ui/base/events/event.h" | 10 #include "ui/base/events/event.h" |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 | 728 |
729 void* Widget::GetNativeWindowProperty(const char* name) const { | 729 void* Widget::GetNativeWindowProperty(const char* name) const { |
730 return native_widget_->GetNativeWindowProperty(name); | 730 return native_widget_->GetNativeWindowProperty(name); |
731 } | 731 } |
732 | 732 |
733 void Widget::UpdateWindowTitle() { | 733 void Widget::UpdateWindowTitle() { |
734 if (!non_client_view_) | 734 if (!non_client_view_) |
735 return; | 735 return; |
736 | 736 |
737 // If the non-client view is rendering its own title, it'll need to relayout | 737 // If the non-client view is rendering its own title, it'll need to relayout |
738 // now. | 738 // now and to get a paint update later on. |
739 non_client_view_->Layout(); | 739 non_client_view_->Layout(); |
| 740 non_client_view_->UpdateWindowTitle(); |
740 | 741 |
741 // Update the native frame's text. We do this regardless of whether or not | 742 // Update the native frame's text. We do this regardless of whether or not |
742 // the native frame is being used, since this also updates the taskbar, etc. | 743 // the native frame is being used, since this also updates the taskbar, etc. |
743 string16 window_title; | 744 string16 window_title; |
744 if (native_widget_->IsScreenReaderActive()) { | 745 if (native_widget_->IsScreenReaderActive()) { |
745 window_title = widget_delegate_->GetAccessibleWindowTitle(); | 746 window_title = widget_delegate_->GetAccessibleWindowTitle(); |
746 } else { | 747 } else { |
747 window_title = widget_delegate_->GetWindowTitle(); | 748 window_title = widget_delegate_->GetWindowTitle(); |
748 } | 749 } |
749 base::i18n::AdjustStringForLocaleDirection(&window_title); | 750 base::i18n::AdjustStringForLocaleDirection(&window_title); |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 | 1345 |
1345 //////////////////////////////////////////////////////////////////////////////// | 1346 //////////////////////////////////////////////////////////////////////////////// |
1346 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1347 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1347 | 1348 |
1348 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1349 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1349 return this; | 1350 return this; |
1350 } | 1351 } |
1351 | 1352 |
1352 } // namespace internal | 1353 } // namespace internal |
1353 } // namespace views | 1354 } // namespace views |
OLD | NEW |