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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2381183002: mash: Fix shelf window property use in Chrome. (Closed)
Patch Set: Sync and rebase; add comments. 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 bool WindowManager::OnWmSetProperty( 295 bool WindowManager::OnWmSetProperty(
296 ui::Window* window, 296 ui::Window* window,
297 const std::string& name, 297 const std::string& name,
298 std::unique_ptr<std::vector<uint8_t>>* new_data) { 298 std::unique_ptr<std::vector<uint8_t>>* new_data) {
299 // TODO(sky): constrain this to set of keys we know about, and allowed values. 299 // TODO(sky): constrain this to set of keys we know about, and allowed values.
300 return name == ui::mojom::WindowManager::kShowState_Property || 300 return name == ui::mojom::WindowManager::kShowState_Property ||
301 name == ui::mojom::WindowManager::kPreferredSize_Property || 301 name == ui::mojom::WindowManager::kPreferredSize_Property ||
302 name == ui::mojom::WindowManager::kResizeBehavior_Property || 302 name == ui::mojom::WindowManager::kResizeBehavior_Property ||
303 name == ui::mojom::WindowManager::kShelfIconResourceId_Property ||
304 name == ui::mojom::WindowManager::kShelfItemType_Property ||
James Cook 2016/10/01 00:16:20 Does this need ShelfID?
msw 2016/10/03 19:14:22 Not yet; it will if Chrome needs to actually set w
303 name == ui::mojom::WindowManager::kWindowAppIcon_Property || 305 name == ui::mojom::WindowManager::kWindowAppIcon_Property ||
304 name == ui::mojom::WindowManager::kWindowTitle_Property; 306 name == ui::mojom::WindowManager::kWindowTitle_Property;
305 } 307 }
306 308
307 ui::Window* WindowManager::OnWmCreateTopLevelWindow( 309 ui::Window* WindowManager::OnWmCreateTopLevelWindow(
308 std::map<std::string, std::vector<uint8_t>>* properties) { 310 std::map<std::string, std::vector<uint8_t>>* properties) {
309 return NewTopLevelWindow(properties); 311 return NewTopLevelWindow(properties);
310 } 312 }
311 313
312 void WindowManager::OnWmClientJankinessChanged( 314 void WindowManager::OnWmClientJankinessChanged(
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 const ui::Event& event) { 360 const ui::Event& event) {
359 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); 361 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id));
360 if (iter == accelerator_handlers_.end()) 362 if (iter == accelerator_handlers_.end())
361 return ui::mojom::EventResult::HANDLED; 363 return ui::mojom::EventResult::HANDLED;
362 364
363 return iter->second->OnAccelerator(id, event); 365 return iter->second->OnAccelerator(id, event);
364 } 366 }
365 367
366 } // namespace mus 368 } // namespace mus
367 } // namespace ash 369 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698