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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 void* Widget::GetNativeWindowProperty(const char* name) const { | 789 void* Widget::GetNativeWindowProperty(const char* name) const { |
790 return native_widget_->GetNativeWindowProperty(name); | 790 return native_widget_->GetNativeWindowProperty(name); |
791 } | 791 } |
792 | 792 |
793 void Widget::UpdateWindowTitle() { | 793 void Widget::UpdateWindowTitle() { |
794 if (!non_client_view_) | 794 if (!non_client_view_) |
795 return; | 795 return; |
796 | 796 |
797 // Update the native frame's text. We do this regardless of whether or not | 797 // Update the native frame's text. We do this regardless of whether or not |
798 // the native frame is being used, since this also updates the taskbar, etc. | 798 // the native frame is being used, since this also updates the taskbar, etc. |
799 string16 window_title = widget_delegate_->GetWindowTitle(); | 799 base::string16 window_title = widget_delegate_->GetWindowTitle(); |
800 base::i18n::AdjustStringForLocaleDirection(&window_title); | 800 base::i18n::AdjustStringForLocaleDirection(&window_title); |
801 if (!native_widget_->SetWindowTitle(window_title)) | 801 if (!native_widget_->SetWindowTitle(window_title)) |
802 return; | 802 return; |
803 non_client_view_->UpdateWindowTitle(); | 803 non_client_view_->UpdateWindowTitle(); |
804 | 804 |
805 // If the non-client view is rendering its own title, it'll need to relayout | 805 // If the non-client view is rendering its own title, it'll need to relayout |
806 // now and to get a paint update later on. | 806 // now and to get a paint update later on. |
807 non_client_view_->Layout(); | 807 non_client_view_->Layout(); |
808 } | 808 } |
809 | 809 |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 | 1421 |
1422 //////////////////////////////////////////////////////////////////////////////// | 1422 //////////////////////////////////////////////////////////////////////////////// |
1423 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1423 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1424 | 1424 |
1425 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1425 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1426 return this; | 1426 return this; |
1427 } | 1427 } |
1428 | 1428 |
1429 } // namespace internal | 1429 } // namespace internal |
1430 } // namespace views | 1430 } // namespace views |
OLD | NEW |