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

Unified Diff: mash/shelf/shelf_application.cc

Issue 1585363002: Fork a subset of ash/shelf for use in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ash changes. Created 4 years, 11 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
Index: mash/shelf/shelf_application.cc
diff --git a/mash/shelf/shelf_application.cc b/mash/shelf/shelf_application.cc
index cb829fe362e7c7457e08698b6db8ae52f4dd772d..bc34ebcf14a6889fcc285b0d08dc63ac2faf7a84 100644
--- a/mash/shelf/shelf_application.cc
+++ b/mash/shelf/shelf_application.cc
@@ -27,11 +27,10 @@ void ShelfApplication::Initialize(mojo::ApplicationImpl* app) {
aura_init_.reset(new views::AuraInit(app, "views_mus_resources.pak"));
views::WindowManagerConnection::Create(app);
+ // Construct the shelf using a container tagged for positioning by the WM.
views::Widget* widget = new views::Widget;
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.delegate = new ShelfView(app);
-
std::map<std::string, std::vector<uint8_t>> properties;
properties[mash::wm::mojom::kWindowContainer_Property] =
mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert(
@@ -41,6 +40,8 @@ void ShelfApplication::Initialize(mojo::ApplicationImpl* app) {
params.native_widget = new views::NativeWidgetMus(
widget, app->shell(), window, mus::mojom::SurfaceType::DEFAULT);
widget->Init(params);
+ widget->SetContentsView(new ShelfView(app));
msw 2016/01/27 07:43:41 Add a note and file a bug.
+ widget->CenterWindow(widget->GetContentsView()->GetPreferredSize());
widget->Show();
}
« no previous file with comments | « mash/shelf/DEPS ('k') | mash/shelf/shelf_button.h » ('j') | mash/shelf/shelf_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698