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/oak/oak_window.h" | 5 #include "ui/oak/oak_window.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace { | 22 namespace { |
23 const SkColor kBorderColor = SkColorSetRGB(0xCC, 0xCC, 0xCC); | 23 const SkColor kBorderColor = SkColorSetRGB(0xCC, 0xCC, 0xCC); |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 // static | 26 // static |
27 views::Widget* OakWindow::instance = NULL; | 27 views::Widget* OakWindow::instance = NULL; |
28 | 28 |
29 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
30 // OakWindow, public: | 30 // OakWindow, public: |
31 | 31 |
32 OakWindow::OakWindow() : tree_(NULL), tree_container_(NULL), details_(NULL) { | 32 OakWindow::OakWindow() : tree_container_(NULL) {} |
33 } | |
34 | 33 |
35 OakWindow::~OakWindow() { | 34 OakWindow::~OakWindow() { |
36 // The tree/table need to be destroyed before the model. | 35 // The tree/table need to be destroyed before the model. |
37 tree_.reset(); | 36 tree_.reset(); |
38 details_.reset(); | 37 details_.reset(); |
39 } | 38 } |
40 | 39 |
41 //////////////////////////////////////////////////////////////////////////////// | 40 //////////////////////////////////////////////////////////////////////////////// |
42 // OakWindow, views::WidgetDelegateView implementation: | 41 // OakWindow, views::WidgetDelegateView implementation: |
43 | 42 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // context? For now, this is OK, but if we ever use Oak outside of the ash | 149 // context? For now, this is OK, but if we ever use Oak outside of the ash |
151 // shell, we run into crbug.com/165759. | 150 // shell, we run into crbug.com/165759. |
152 internal::OakWindow::instance = | 151 internal::OakWindow::instance = |
153 views::Widget::CreateWindowWithContextAndBounds( | 152 views::Widget::CreateWindowWithContextAndBounds( |
154 new internal::OakWindow, context, gfx::Rect(10, 10, 500, 500)); | 153 new internal::OakWindow, context, gfx::Rect(10, 10, 500, 500)); |
155 } | 154 } |
156 internal::OakWindow::instance->Show(); | 155 internal::OakWindow::instance->Show(); |
157 } | 156 } |
158 | 157 |
159 } // namespace oak | 158 } // namespace oak |
OLD | NEW |