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

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

Issue 2227643003: Converts mash to use the common non-client frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_widget_mus_fix
Patch Set: feedback Created 4 years, 4 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 | « ash/mus/workspace/workspace_layout_manager_unittest.cc ('k') | ui/views/mus/native_widget_mus.cc » ('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 c428456a152d01d944e4e918e5d720e12b07238e..b7c3ea569cc5eb6f6190c9991c68f6a558c2350d 100644
--- a/mash/example/window_type_launcher/window_type_launcher.cc
+++ b/mash/example/window_type_launcher/window_type_launcher.cc
@@ -22,6 +22,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
+#include "ui/views/background.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/label_button.h"
@@ -55,7 +56,9 @@ class WindowDelegateView : public views::WidgetDelegateView {
PANEL = 1 << 2,
};
- explicit WindowDelegateView(uint32_t traits) : traits_(traits) {}
+ explicit WindowDelegateView(uint32_t traits) : traits_(traits) {
+ set_background(views::Background::CreateSolidBackground(SK_ColorRED));
+ }
~WindowDelegateView() override {}
// Creates and shows a window with the specified traits.
@@ -84,6 +87,8 @@ class WindowDelegateView : public views::WidgetDelegateView {
base::string16 GetWindowTitle() const override {
return base::ASCIIToUTF16("Window");
}
+ gfx::Size GetPreferredSize() const override { return gfx::Size(300, 300); }
+ View* GetContentsView() override { return this; }
private:
const uint32_t traits_;
« no previous file with comments | « ash/mus/workspace/workspace_layout_manager_unittest.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698