| 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/macros.h" | 8 #include "base/macros.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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 else if (params.show_state == ui::SHOW_STATE_MINIMIZED) | 390 else if (params.show_state == ui::SHOW_STATE_MINIMIZED) |
| 391 Minimize(); | 391 Minimize(); |
| 392 } else if (params.delegate) { | 392 } else if (params.delegate) { |
| 393 SetContentsView(params.delegate->GetContentsView()); | 393 SetContentsView(params.delegate->GetContentsView()); |
| 394 SetInitialBoundsForFramelessWindow(params.bounds); | 394 SetInitialBoundsForFramelessWindow(params.bounds); |
| 395 } | 395 } |
| 396 // This must come after SetContentsView() or it might not be able to find | 396 // This must come after SetContentsView() or it might not be able to find |
| 397 // the correct NativeTheme (on Linux). See http://crbug.com/384492 | 397 // the correct NativeTheme (on Linux). See http://crbug.com/384492 |
| 398 observer_manager_.Add(GetNativeTheme()); | 398 observer_manager_.Add(GetNativeTheme()); |
| 399 native_widget_initialized_ = true; | 399 native_widget_initialized_ = true; |
| 400 native_widget_->OnWidgetInitDone(); |
| 400 } | 401 } |
| 401 | 402 |
| 402 // Unconverted methods (see header) -------------------------------------------- | 403 // Unconverted methods (see header) -------------------------------------------- |
| 403 | 404 |
| 404 gfx::NativeView Widget::GetNativeView() const { | 405 gfx::NativeView Widget::GetNativeView() const { |
| 405 return native_widget_->GetNativeView(); | 406 return native_widget_->GetNativeView(); |
| 406 } | 407 } |
| 407 | 408 |
| 408 gfx::NativeWindow Widget::GetNativeWindow() const { | 409 gfx::NativeWindow Widget::GetNativeWindow() const { |
| 409 return native_widget_->GetNativeWindow(); | 410 return native_widget_->GetNativeWindow(); |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 | 1513 |
| 1513 //////////////////////////////////////////////////////////////////////////////// | 1514 //////////////////////////////////////////////////////////////////////////////// |
| 1514 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1515 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1515 | 1516 |
| 1516 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1517 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1517 return this; | 1518 return this; |
| 1518 } | 1519 } |
| 1519 | 1520 |
| 1520 } // namespace internal | 1521 } // namespace internal |
| 1521 } // namespace views | 1522 } // namespace views |
| OLD | NEW |