| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/main/debug/debug_window.h" | 5 #include "athena/main/debug/debug_window.h" |
| 6 | 6 |
| 7 #include "athena/resources/athena_resources.h" | 7 #include "athena/resources/athena_resources.h" |
| 8 #include "athena/screen/public/screen_manager.h" | 8 #include "athena/screen/public/screen_manager.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 CreateBatteryView(); | 161 CreateBatteryView(); |
| 162 CreateNetworkView(); | 162 CreateNetworkView(); |
| 163 | 163 |
| 164 UpdateSize(); | 164 UpdateSize(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 virtual ~DebugWidget() {} | 167 virtual ~DebugWidget() {} |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 void CreateContainer() { | 170 void CreateContainer() { |
| 171 container_ = | 171 athena::ScreenManager::ContainerParams params("DebugContainer"); |
| 172 athena::ScreenManager::Get()->CreateContainer("DebugContainer"); | 172 container_ = athena::ScreenManager::Get()->CreateContainer(params); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void CreateWidget() { | 175 void CreateWidget() { |
| 176 views::Widget::InitParams params; | 176 views::Widget::InitParams params; |
| 177 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; | 177 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; |
| 178 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 178 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 179 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 179 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
| 180 params.accept_events = false; | 180 params.accept_events = false; |
| 181 params.bounds = gfx::Rect(200, 0, 100, 105); | 181 params.bounds = gfx::Rect(200, 0, 100, 105); |
| 182 params.parent = container_; | 182 params.parent = container_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 scoped_ptr<NetworkStatus> network_status_; | 244 scoped_ptr<NetworkStatus> network_status_; |
| 245 | 245 |
| 246 DISALLOW_COPY_AND_ASSIGN(DebugWidget); | 246 DISALLOW_COPY_AND_ASSIGN(DebugWidget); |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 } // namespace | 249 } // namespace |
| 250 | 250 |
| 251 void CreateDebugWindow() { | 251 void CreateDebugWindow() { |
| 252 new DebugWidget(); | 252 new DebugWidget(); |
| 253 } | 253 } |
| OLD | NEW |