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

Unified Diff: mash/example/window_type_launcher/window_type_launcher.cc

Issue 2010473003: Wires up shelf to panel and dock layoutmanagers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/example/window_type_launcher/BUILD.gn ('k') | mash/wm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/example/window_type_launcher/window_type_launcher.cc
diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc
index 5f5da3f1138117e1b696b061b85c4a1a00f728c7..f77f57cfc5a5d27ef15775fefea75c1ef6bc9782 100644
--- a/mash/example/window_type_launcher/window_type_launcher.cc
+++ b/mash/example/window_type_launcher/window_type_launcher.cc
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
+#include "components/mus/public/cpp/property_type_converters.h"
#include "mash/session/public/interfaces/session.mojom.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "services/shell/public/cpp/connection.h"
@@ -59,6 +60,12 @@ class WindowDelegateView : public views::WidgetDelegateView {
views::Widget::InitParams params(
(traits & PANEL) != 0 ? views::Widget::InitParams::TYPE_PANEL
: views::Widget::InitParams::TYPE_WINDOW);
+ if ((traits & PANEL) != 0) {
+ params
+ .mus_properties[mus::mojom::WindowManager::kInitialBounds_Property] =
+ mojo::TypeConverter<std::vector<uint8_t>, gfx::Rect>::Convert(
+ gfx::Rect(100, 100, 300, 300));
+ }
params.keep_on_top = (traits & ALWAYS_ON_TOP) != 0;
// WidgetDelegateView deletes itself when Widget is destroyed.
params.delegate = new WindowDelegateView(traits);
« no previous file with comments | « mash/example/window_type_launcher/BUILD.gn ('k') | mash/wm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698