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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
730 | 730 |
731 void* Widget::GetNativeWindowProperty(const char* name) const { | 731 void* Widget::GetNativeWindowProperty(const char* name) const { |
732 return native_widget_->GetNativeWindowProperty(name); | 732 return native_widget_->GetNativeWindowProperty(name); |
733 } | 733 } |
734 | 734 |
735 void Widget::UpdateWindowTitle() { | 735 void Widget::UpdateWindowTitle() { |
736 if (!non_client_view_) | 736 if (!non_client_view_) |
737 return; | 737 return; |
738 | 738 |
739 // If the non-client view is rendering its own title, it'll need to relayout | 739 // If the non-client view is rendering its own title, it'll need to relayout |
740 // now. | 740 // now and to get a paint update later on. |
741 non_client_view_->Layout(); | 741 non_client_view_->Layout(); |
742 non_client_view_->UpdateWindowTitle(); | |
sky
2012/09/28 22:47:12
Don't you need to do all this after updating the n
Mr4D (OOO till 08-26)
2012/09/29 00:44:25
Okay. Changed. Not sure if this might cause proble
| |
742 | 743 |
743 // Update the native frame's text. We do this regardless of whether or not | 744 // Update the native frame's text. We do this regardless of whether or not |
744 // the native frame is being used, since this also updates the taskbar, etc. | 745 // the native frame is being used, since this also updates the taskbar, etc. |
745 string16 window_title; | 746 string16 window_title; |
746 if (native_widget_->IsScreenReaderActive()) { | 747 if (native_widget_->IsScreenReaderActive()) { |
747 window_title = widget_delegate_->GetAccessibleWindowTitle(); | 748 window_title = widget_delegate_->GetAccessibleWindowTitle(); |
748 } else { | 749 } else { |
749 window_title = widget_delegate_->GetWindowTitle(); | 750 window_title = widget_delegate_->GetWindowTitle(); |
750 } | 751 } |
751 base::i18n::AdjustStringForLocaleDirection(&window_title); | 752 base::i18n::AdjustStringForLocaleDirection(&window_title); |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1346 | 1347 |
1347 //////////////////////////////////////////////////////////////////////////////// | 1348 //////////////////////////////////////////////////////////////////////////////// |
1348 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1349 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1349 | 1350 |
1350 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1351 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1351 return this; | 1352 return this; |
1352 } | 1353 } |
1353 | 1354 |
1354 } // namespace internal | 1355 } // namespace internal |
1355 } // namespace views | 1356 } // namespace views |
OLD | NEW |