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

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

Issue 1980593002: Changes container names and adds a couple of more (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change include Created 4 years, 7 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 | mash/wm/BUILD.gn » ('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/mus/sysui_application.h" 5 #include "ash/mus/sysui_application.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const char kResourceFile100[] = "ash_resources_100_percent.pak"; 58 const char kResourceFile100[] = "ash_resources_100_percent.pak";
59 const char kResourceFile200[] = "ash_resources_200_percent.pak"; 59 const char kResourceFile200[] = "ash_resources_200_percent.pak";
60 60
61 // Tries to determine the corresponding mash container from widget init params. 61 // Tries to determine the corresponding mash container from widget init params.
62 mash::wm::mojom::Container GetContainerId( 62 mash::wm::mojom::Container GetContainerId(
63 const views::Widget::InitParams& params) { 63 const views::Widget::InitParams& params) {
64 const int id = params.parent->id(); 64 const int id = params.parent->id();
65 if (id == kShellWindowId_DesktopBackgroundContainer) 65 if (id == kShellWindowId_DesktopBackgroundContainer)
66 return mash::wm::mojom::Container::USER_BACKGROUND; 66 return mash::wm::mojom::Container::USER_BACKGROUND;
67 if (id == kShellWindowId_ShelfContainer) 67 if (id == kShellWindowId_ShelfContainer)
68 return mash::wm::mojom::Container::USER_SHELF; 68 return mash::wm::mojom::Container::USER_PRIVATE_SHELF;
69 if (id == kShellWindowId_StatusContainer) 69 if (id == kShellWindowId_StatusContainer)
70 return mash::wm::mojom::Container::STATUS; 70 return mash::wm::mojom::Container::STATUS;
71 71
72 // Determine the container based on Widget type. 72 // Determine the container based on Widget type.
73 switch (params.type) { 73 switch (params.type) {
74 case views::Widget::InitParams::Type::TYPE_BUBBLE: 74 case views::Widget::InitParams::Type::TYPE_BUBBLE:
75 return mash::wm::mojom::Container::BUBBLES; 75 return mash::wm::mojom::Container::BUBBLES;
76 case views::Widget::InitParams::Type::TYPE_MENU: 76 case views::Widget::InitParams::Type::TYPE_MENU:
77 return mash::wm::mojom::Container::MENUS; 77 return mash::wm::mojom::Container::MENUS;
78 case views::Widget::InitParams::Type::TYPE_TOOLTIP: 78 case views::Widget::InitParams::Type::TYPE_TOOLTIP:
79 return mash::wm::mojom::Container::TOOLTIPS; 79 return mash::wm::mojom::Container::DRAG_AND_TOOLTIPS;
80 default: 80 default:
81 return mash::wm::mojom::Container::COUNT; 81 return mash::wm::mojom::Container::COUNT;
82 } 82 }
83 } 83 }
84 84
85 // Tries to determine the corresponding ash window type from the ash container 85 // Tries to determine the corresponding ash window type from the ash container
86 // for the widget. 86 // for the widget.
87 mash::wm::mojom::AshWindowType GetAshWindowType(aura::Window* container) { 87 mash::wm::mojom::AshWindowType GetAshWindowType(aura::Window* container) {
88 DCHECK(container); 88 DCHECK(container);
89 int id = container->id(); 89 int id = container->id();
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 void SysUIApplication::Create( 324 void SysUIApplication::Create(
325 ::shell::Connection* connection, 325 ::shell::Connection* connection,
326 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { 326 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) {
327 mash::shelf::mojom::ShelfController* shelf_controller = 327 mash::shelf::mojom::ShelfController* shelf_controller =
328 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); 328 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate());
329 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); 329 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request));
330 } 330 }
331 331
332 } // namespace sysui 332 } // namespace sysui
333 } // namespace ash 333 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | mash/wm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698