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

Side by Side Diff: ash/autoclick/mus/autoclick_application.cc

Issue 2751523003: Convert Window Container Ids to an Enum (Closed)
Patch Set: Rebase ... Created 3 years, 8 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
« no previous file with comments | « no previous file | ash/public/cpp/shell_window_ids.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/autoclick/mus/autoclick_application.h" 5 #include "ash/autoclick/mus/autoclick_application.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 views::Widget::InitParams params( 107 views::Widget::InitParams params(
108 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 108 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
109 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 109 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
110 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 110 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
111 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; 111 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
112 params.accept_events = false; 112 params.accept_events = false;
113 params.delegate = new AutoclickUI(autoclick_controller_common_.get()); 113 params.delegate = new AutoclickUI(autoclick_controller_common_.get());
114 114
115 params.mus_properties[ui::mojom::WindowManager::kContainerId_InitProperty] = 115 params.mus_properties[ui::mojom::WindowManager::kContainerId_InitProperty] =
116 mojo::ConvertTo<std::vector<uint8_t>>( 116 mojo::ConvertTo<std::vector<uint8_t>>(
117 ash::kShellWindowId_OverlayContainer); 117 static_cast<int32_t>(ash::kShellWindowId_OverlayContainer));
118 params.show_state = ui::SHOW_STATE_FULLSCREEN; 118 params.show_state = ui::SHOW_STATE_FULLSCREEN;
119 widget_->Init(params); 119 widget_->Init(params);
120 } else { 120 } else {
121 widget_->Close(); 121 widget_->Close();
122 base::MessageLoop::current()->QuitWhenIdle(); 122 base::MessageLoop::current()->QuitWhenIdle();
123 } 123 }
124 } 124 }
125 125
126 void AutoclickApplication::SetAutoclickDelay(uint32_t delay_in_milliseconds) { 126 void AutoclickApplication::SetAutoclickDelay(uint32_t delay_in_milliseconds) {
127 autoclick_controller_common_->SetAutoclickDelay( 127 autoclick_controller_common_->SetAutoclickDelay(
(...skipping 30 matching lines...) Expand all
158 // TODO(riajiang): Currently not working. Need to know how to generate events 158 // TODO(riajiang): Currently not working. Need to know how to generate events
159 // in mus world (crbug.com/628665). 159 // in mus world (crbug.com/628665).
160 } 160 }
161 161
162 void AutoclickApplication::OnAutoclickCanceled() { 162 void AutoclickApplication::OnAutoclickCanceled() {
163 // Not used in mus. 163 // Not used in mus.
164 } 164 }
165 165
166 } // namespace autoclick 166 } // namespace autoclick
167 } // namespace ash 167 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/public/cpp/shell_window_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698