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

Unified Diff: ash/mus/window_manager.cc

Issue 2702423004: Validate incoming window properties. (Closed)
Patch Set: sky comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/public/cpp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index 26879415f2f793a6fcd7aa06b6c8d56fddd16721..5602244c38c18e0e2377959bb10d2e5ff42b8c0d 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -23,6 +23,7 @@
#include "ash/mus/shell_delegate_mus.h"
#include "ash/mus/top_level_window_factory.h"
#include "ash/mus/window_properties.h"
+#include "ash/public/cpp/shelf_types.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h"
#include "ash/root_window_controller.h"
@@ -65,15 +66,19 @@ WindowManager::WindowManager(service_manager::Connector* connector)
wm_state_(base::MakeUnique<::wm::WMState>()),
property_converter_(base::MakeUnique<aura::PropertyConverter>()) {
property_converter_->RegisterProperty(
- kPanelAttachedKey, ui::mojom::WindowManager::kPanelAttached_Property);
+ kPanelAttachedKey, ui::mojom::WindowManager::kPanelAttached_Property,
+ aura::PropertyConverter::CreateAcceptAnyValueCallback());
property_converter_->RegisterProperty(
kRenderTitleAreaProperty,
- ui::mojom::WindowManager::kRenderParentTitleArea_Property);
+ ui::mojom::WindowManager::kRenderParentTitleArea_Property,
+ aura::PropertyConverter::CreateAcceptAnyValueCallback());
property_converter_->RegisterProperty(
- kShelfItemTypeKey, ui::mojom::WindowManager::kShelfItemType_Property);
+ kShelfItemTypeKey, ui::mojom::WindowManager::kShelfItemType_Property,
+ base::Bind(&IsValidShelfItemType));
property_converter_->RegisterProperty(
::wm::kShadowElevationKey,
- ui::mojom::WindowManager::kShadowElevation_Property);
+ ui::mojom::WindowManager::kShadowElevation_Property,
+ base::Bind(&::wm::IsValidShadowElevation));
}
WindowManager::~WindowManager() {
« no previous file with comments | « no previous file | ash/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698