OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/aura_shell/status_area_view.h" | 5 #include "ui/aura_shell/status_area_view.h" |
6 | 6 |
7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
8 #include "ui/aura/desktop.h" | 8 #include "ui/aura/desktop.h" |
9 #include "ui/aura_shell/aura_shell_export.h" | 9 #include "ui/aura_shell/aura_shell_export.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 StatusAreaView* status_area_view = new StatusAreaView; | 33 StatusAreaView* status_area_view = new StatusAreaView; |
34 views::Widget* widget = new views::Widget; | 34 views::Widget* widget = new views::Widget; |
35 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); | 35 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); |
36 gfx::Size ps = status_area_view->GetPreferredSize(); | 36 gfx::Size ps = status_area_view->GetPreferredSize(); |
37 params.bounds = gfx::Rect(0, 0, ps.width(), ps.height()); | 37 params.bounds = gfx::Rect(0, 0, ps.width(), ps.height()); |
38 params.parent = aura::Desktop::GetInstance()->window(); | 38 params.parent = aura::Desktop::GetInstance()->window(); |
39 params.delegate = status_area_view; | 39 params.delegate = status_area_view; |
40 widget->Init(params); | 40 widget->Init(params); |
41 widget->SetContentsView(status_area_view); | 41 widget->SetContentsView(status_area_view); |
42 widget->Show(); | 42 widget->Show(); |
| 43 widget->GetNativeView()->set_name(L"StatusAreaView"); |
43 return widget; | 44 return widget; |
44 } | 45 } |
45 | 46 |
46 } // namespace internal | 47 } // namespace internal |
47 } // namespace aura_shell | 48 } // namespace aura_shell |
OLD | NEW |