Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: ash/touch_hud/mus/touch_hud_application.cc

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/touch_hud/mus/touch_hud_application.h" 5 #include "ash/touch_hud/mus/touch_hud_application.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/touch_hud/touch_hud_renderer.h" 8 #include "ash/touch_hud/touch_hud_renderer.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 std::map<std::string, std::vector<uint8_t>> properties; 90 std::map<std::string, std::vector<uint8_t>> properties;
91 properties[ui::mojom::WindowManager::kInitialContainerId_Property] = 91 properties[ui::mojom::WindowManager::kInitialContainerId_Property] =
92 mojo::ConvertTo<std::vector<uint8_t>>( 92 mojo::ConvertTo<std::vector<uint8_t>>(
93 ash::kShellWindowId_OverlayContainer); 93 ash::kShellWindowId_OverlayContainer);
94 properties[ui::mojom::WindowManager::kShowState_Property] = 94 properties[ui::mojom::WindowManager::kShowState_Property] =
95 mojo::ConvertTo<std::vector<uint8_t>>( 95 mojo::ConvertTo<std::vector<uint8_t>>(
96 static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN)); 96 static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN));
97 ui::Window* window = 97 ui::Window* window =
98 window_manager_connection_.get()->NewTopLevelWindow(properties); 98 window_manager_connection_.get()->NewTopLevelWindow(properties);
99 params.native_widget = new views::NativeWidgetMus( 99 params.native_widget = new views::NativeWidgetMus(
100 widget_, window, ui::mojom::SurfaceType::DEFAULT); 100 widget_, window, ui::mojom::CompositorFrameSinkType::DEFAULT);
101 widget_->Init(params); 101 widget_->Init(params);
102 widget_->Show(); 102 widget_->Show();
103 } else { 103 } else {
104 widget_->Close(); 104 widget_->Close();
105 base::MessageLoop::current()->QuitWhenIdle(); 105 base::MessageLoop::current()->QuitWhenIdle();
106 } 106 }
107 } 107 }
108 108
109 void TouchHudApplication::Create( 109 void TouchHudApplication::Create(
110 const service_manager::Identity& remote_identity, 110 const service_manager::Identity& remote_identity,
111 mash::mojom::LaunchableRequest request) { 111 mash::mojom::LaunchableRequest request) {
112 binding_.Close(); 112 binding_.Close();
113 binding_.Bind(std::move(request)); 113 binding_.Bind(std::move(request));
114 } 114 }
115 115
116 } // namespace touch_hud 116 } // namespace touch_hud
117 } // namespace ash 117 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/non_client_frame_controller.cc ('k') | chrome/browser/ui/views/frame/browser_frame_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698