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

Unified Diff: chrome/browser/ui/views/constrained_window_frame_view.cc

Issue 10631010: Change style of ConstrainedWindowViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 6 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: chrome/browser/ui/views/constrained_window_frame_view.cc
diff --git a/chrome/browser/ui/views/constrained_window_frame_view.cc b/chrome/browser/ui/views/constrained_window_frame_view.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b5d562e05f406fb6a3c0cee3add5be8d7a6db64e
--- /dev/null
+++ b/chrome/browser/ui/views/constrained_window_frame_view.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 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/constrained_window_frame_view.h"
+
+#include "chrome/browser/ui/views/constrained_window_views.h"
+#include "ui/base/hit_test.h"
+#include "ui/gfx/rect.h"
+#include "ui/views/widget/widget.h"
+
+ConstrainedWindowFrameView::ConstrainedWindowFrameView(
+ ConstrainedWindowViews* container) {
+ // Draw a custom frame, ie NO frame.
+ container->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM);
+}
+
+gfx::Rect ConstrainedWindowFrameView::GetBoundsForClientView() const {
+ return bounds();
+}
+
+gfx::Rect ConstrainedWindowFrameView::GetWindowBoundsForClientBounds(
+ const gfx::Rect& client_bounds) const {
+ return client_bounds;
+}
+
+int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) {
+ if (!bounds().Contains(point))
+ return HTNOWHERE;
+ return HTCLIENT;
+}

Powered by Google App Engine
This is Rietveld 408576698