Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/autoclick/mus/autoclick_application.h" | 5 #include "ash/autoclick/mus/autoclick_application.h" |
| 6 | 6 |
| 7 #include "ash/public/interfaces/container.mojom.h" | 7 #include "ash/public/interfaces/container.mojom.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "services/service_manager/public/cpp/connector.h" | 10 #include "services/service_manager/public/cpp/connector.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 std::map<std::string, std::vector<uint8_t>> properties; | 106 std::map<std::string, std::vector<uint8_t>> properties; |
| 107 properties[ash::mojom::kWindowContainer_Property] = | 107 properties[ash::mojom::kWindowContainer_Property] = |
| 108 mojo::ConvertTo<std::vector<uint8_t>>( | 108 mojo::ConvertTo<std::vector<uint8_t>>( |
| 109 static_cast<int32_t>(ash::mojom::Container::OVERLAY)); | 109 static_cast<int32_t>(ash::mojom::Container::OVERLAY)); |
| 110 properties[ui::mojom::WindowManager::kShowState_Property] = | 110 properties[ui::mojom::WindowManager::kShowState_Property] = |
| 111 mojo::ConvertTo<std::vector<uint8_t>>( | 111 mojo::ConvertTo<std::vector<uint8_t>>( |
| 112 static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN)); | 112 static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN)); |
| 113 ui::Window* window = | 113 ui::Window* window = |
| 114 window_manager_connection_.get()->NewTopLevelWindow(properties); | 114 window_manager_connection_.get()->NewTopLevelWindow(properties); |
| 115 params.native_widget = new views::NativeWidgetMus( | 115 params.native_widget = new views::NativeWidgetMus( |
| 116 widget_.get(), window, ui::mojom::SurfaceType::DEFAULT); | 116 widget_.get(), window, ui::mojom::CompositorFrameSinkType::DEFAULT); |
|
rjkroege
2016/10/20 22:22:18
isn't it a layering violation that this code even
Fady Samuel
2016/10/21 20:53:26
This will go away once underlay CompositorFrameSin
| |
| 117 widget_->Init(params); | 117 widget_->Init(params); |
| 118 } else { | 118 } else { |
| 119 widget_->Close(); | 119 widget_->Close(); |
| 120 base::MessageLoop::current()->QuitWhenIdle(); | 120 base::MessageLoop::current()->QuitWhenIdle(); |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 void AutoclickApplication::SetAutoclickDelay(uint32_t delay_in_milliseconds) { | 124 void AutoclickApplication::SetAutoclickDelay(uint32_t delay_in_milliseconds) { |
| 125 autoclick_controller_common_->SetAutoclickDelay( | 125 autoclick_controller_common_->SetAutoclickDelay( |
| 126 base::TimeDelta::FromMilliseconds(delay_in_milliseconds)); | 126 base::TimeDelta::FromMilliseconds(delay_in_milliseconds)); |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 156 // TODO(riajiang): Currently not working. Need to know how to generate events | 156 // TODO(riajiang): Currently not working. Need to know how to generate events |
| 157 // in mus world (crbug.com/628665). | 157 // in mus world (crbug.com/628665). |
| 158 } | 158 } |
| 159 | 159 |
| 160 void AutoclickApplication::OnAutoclickCanceled() { | 160 void AutoclickApplication::OnAutoclickCanceled() { |
| 161 // Not used in mus. | 161 // Not used in mus. |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace autoclick | 164 } // namespace autoclick |
| 165 } // namespace ash | 165 } // namespace ash |
| OLD | NEW |