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

Unified Diff: mash/wm/non_client_frame_controller.cc

Issue 1459653002: Gets mustash frames looking like that of ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 5 years, 1 month 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/wm/non_client_frame_controller.h ('k') | mash/wm/non_client_frame_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/non_client_frame_controller.cc
diff --git a/mash/wm/non_client_frame_controller.cc b/mash/wm/non_client_frame_controller.cc
index b9a95ed384b76d87eb339c6e53ceaaaf9dbe74d0..b0eef4e31359fddc69af51e5a3a470113cb7c86c 100644
--- a/mash/wm/non_client_frame_controller.cc
+++ b/mash/wm/non_client_frame_controller.cc
@@ -5,7 +5,7 @@
#include "mash/wm/non_client_frame_controller.h"
#include "components/mus/public/cpp/window.h"
-#include "mash/wm/non_client_frame_view_impl.h"
+#include "mash/wm/frame/non_client_frame_view_mash.h"
#include "mash/wm/property_util.h"
#include "ui/views/mus/native_widget_mus.h"
#include "ui/views/widget/widget.h"
@@ -25,9 +25,10 @@ class WmNativeWidgetMus : public views::NativeWidgetMus {
// NativeWidgetMus:
views::NonClientFrameView* CreateNonClientFrameView() override {
- NonClientFrameViewImpl* frame_view = new NonClientFrameViewImpl(window());
- frame_view->Init(
- static_cast<views::internal::NativeWidgetPrivate*>(this)->GetWidget());
+ views::Widget* widget =
+ static_cast<views::internal::NativeWidgetPrivate*>(this)->GetWidget();
+ mash::wm::NonClientFrameViewMash* frame_view =
+ new mash::wm::NonClientFrameViewMash(widget, window());
return frame_view;
}
void CenterWindow(const gfx::Size& size) override {
@@ -56,6 +57,11 @@ NonClientFrameController::NonClientFrameController(mojo::Shell* shell,
widget_->Show();
}
+// static
+gfx::Insets NonClientFrameController::GetPreferredClientAreaInsets() {
+ return mash::wm::NonClientFrameViewMash::GetPreferredClientAreaInsets();
+}
+
NonClientFrameController::~NonClientFrameController() {
if (window_)
window_->RemoveObserver(this);
« no previous file with comments | « mash/wm/non_client_frame_controller.h ('k') | mash/wm/non_client_frame_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698