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

Unified Diff: chrome/browser/ui/views/frame/mus_browser_frame.cc

Issue 1416373010: Implement a MusBrowserFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome
Patch Set: . 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
Index: chrome/browser/ui/views/frame/mus_browser_frame.cc
diff --git a/chrome/browser/ui/views/frame/mus_browser_frame.cc b/chrome/browser/ui/views/frame/mus_browser_frame.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7eb6574c5ec217d2f5d0217b4538fceb65bbae26
--- /dev/null
+++ b/chrome/browser/ui/views/frame/mus_browser_frame.cc
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/frame/mus_browser_frame.h"
+
+#include "chrome/browser/ui/views/frame/browser_frame.h"
+#include "components/mus/public/interfaces/window_tree.mojom.h"
+#include "mojo/application/public/cpp/application_impl.h"
+#include "ui/views/mus/window_manager_connection.h"
+
+MusBrowserFrame::MusBrowserFrame(BrowserFrame* browser_frame,
+ BrowserView* browser_view)
+ : views::NativeWidgetMus(
+ browser_frame,
+ views::WindowManagerConnection::Get()->app()->shell(),
+ views::WindowManagerConnection::Get()->NewWindow(
+ std::map<std::string, std::vector<uint8_t>>()),
+ mus::mojom::SURFACE_TYPE_DEFAULT),
+ browser_view_(browser_view) {
+}
+MusBrowserFrame::~MusBrowserFrame() {}
+
+views::Widget::InitParams MusBrowserFrame::GetWidgetParams() {
+ views::Widget::InitParams params;
+ params.native_widget = this;
+ params.bounds = gfx::Rect(10, 10, 640, 480);
+ return params;
+}
+bool MusBrowserFrame::UseCustomFrame() const {
sky 2015/11/06 17:07:46 nit: more space!
+ return true;
+}
+bool MusBrowserFrame::UsesNativeSystemMenu() const {
+ return false;
+}
+bool MusBrowserFrame::ShouldSaveWindowPlacement() const {
+ return false;
+}
+void MusBrowserFrame::GetWindowPlacement(
+ gfx::Rect* bounds, ui::WindowShowState* show_state) const {
+ *bounds = gfx::Rect(10, 10, 800, 600);
+ *show_state = ui::SHOW_STATE_NORMAL;
+}
+int MusBrowserFrame::GetMinimizeButtonOffset() const {
+ return 0;
+}

Powered by Google App Engine
This is Rietveld 408576698