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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h

Issue 1019023002: MacViews: Implement non-client frame view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wrench-menu
Patch Set: Use Yosemite colors Created 5 years, 9 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/frame/browser_non_client_frame_view_mac.h
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3743a3d08bde2933a678b0ea0226c8881d4dc5f
--- /dev/null
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
@@ -0,0 +1,50 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MAC_H_
+#define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MAC_H_
+
+#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
+
+class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView {
+ public:
+ // Mac implementation of BrowserNonClientFrameView.
+ BrowserNonClientFrameViewMac(BrowserFrame* frame, BrowserView* browser_view);
+ ~BrowserNonClientFrameViewMac() override;
+
+ // BrowserNonClientFrameView:
+ gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override;
+ int GetTopInset() const override;
+ int GetThemeBackgroundXInset() const override;
+ void UpdateThrobber(bool running) override;
+
+ // views::NonClientFrameView:
+ gfx::Rect GetBoundsForClientView() const override;
+ gfx::Rect GetWindowBoundsForClientBounds(
+ const gfx::Rect& client_bounds) const override;
+ int NonClientHitTest(const gfx::Point& point) override;
+ void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override;
+ void ResetWindowControls() override;
+ void UpdateWindowIcon() override;
+ void UpdateWindowTitle() override;
+ void SizeConstraintsChanged() override;
+
+ // views::View:
+ gfx::Size GetMinimumSize() const override;
+
+ protected:
+ // views::View:
+ void OnPaint(gfx::Canvas* canvas) override;
+
+ // BrowserNonClientFrameView:
+ void UpdateNewStyleAvatar() override;
+
+ private:
+ void PaintThemedFrame(gfx::Canvas* canvas);
+ void PaintToolbarBackground(gfx::Canvas* canvas);
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMac);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698