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

Unified Diff: chrome/browser/ui/views/panels/panel_frame_view.h

Issue 2263863002: Remove implementation of Panels on OSes other than ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR 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 | « chrome/browser/ui/views/panels/OWNERS ('k') | chrome/browser/ui/views/panels/panel_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/panels/panel_frame_view.h
diff --git a/chrome/browser/ui/views/panels/panel_frame_view.h b/chrome/browser/ui/views/panels/panel_frame_view.h
deleted file mode 100644
index 1640be01b3875ecfa1cb05f99f17599990bcce62..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/panels/panel_frame_view.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// 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.
-
-#ifndef CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_FRAME_VIEW_H_
-#define CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_FRAME_VIEW_H_
-
-#include "base/macros.h"
-#include "chrome/browser/ui/panels/panel_constants.h"
-#include "chrome/browser/ui/views/tab_icon_view_model.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/window/non_client_view.h"
-
-class PanelView;
-class TabIconView;
-
-namespace views {
-class ImageButton;
-class Label;
-}
-
-class PanelFrameView : public views::NonClientFrameView,
- public views::ButtonListener,
- public TabIconViewModel {
- public:
- enum PaintState {
- PAINT_AS_INACTIVE,
- PAINT_AS_ACTIVE,
- PAINT_AS_MINIMIZED,
- PAINT_FOR_ATTENTION
- };
-
- explicit PanelFrameView(PanelView* panel_view);
- ~PanelFrameView() override;
-
- void Init();
- void UpdateTitle();
- void UpdateIcon();
- void UpdateThrobber();
- void UpdateTitlebarMinimizeRestoreButtonVisibility();
- void SetWindowCornerStyle(panel::CornerStyle corner_style);
-
- // Returns the size of the non-client area, that is, the window size minus
- // the size of the client area.
- gfx::Size NonClientAreaSize() const;
-
- int BorderThickness() const;
-
- PaintState GetPaintState() const;
-
- views::ImageButton* close_button() const { return close_button_; }
- views::ImageButton* minimize_button() const { return minimize_button_; }
- views::ImageButton* restore_button() const { return restore_button_; }
- TabIconView* title_icon() const { return title_icon_; }
- views::Label* title_label() const { return title_label_; }
- panel::CornerStyle corner_style() const { return corner_style_; }
-
- private:
- // Overridden from 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;
-
- // Overridden from views::View:
- gfx::Size GetPreferredSize() const override;
- const char* GetClassName() const override;
- gfx::Size GetMinimumSize() const override;
- gfx::Size GetMaximumSize() const override;
- void Layout() override;
- void OnPaint(gfx::Canvas* canvas) override;
- bool OnMousePressed(const ui::MouseEvent& event) override;
- bool OnMouseDragged(const ui::MouseEvent& event) override;
- void OnMouseReleased(const ui::MouseEvent& event) override;
- void OnMouseCaptureLost() override;
-
- // Overridden from views::ButtonListener:
- void ButtonPressed(views::Button* sender, const ui::Event& event) override;
-
- // Overridden from TabIconViewModel:
- bool ShouldTabIconViewAnimate() const override;
- gfx::ImageSkia GetFaviconForTabIconView() override;
-
- int TitlebarHeight() const;
-
- const gfx::ImageSkia* GetFrameBackground(PaintState paint_state) const;
-
- // Update control styles to indicate if the titlebar is active or not.
- void UpdateControlStyles(PaintState paint_state);
-
- // Custom draw the frame.
- void PaintFrameBackground(gfx::Canvas* canvas);
- void PaintFrameEdge(gfx::Canvas* canvas);
-
- // Retrieves the drawing metrics based on the current painting state.
- SkColor GetTitleColor(PaintState paint_state) const;
-
- // Returns true if |mouse_location| is within the panel's resizing area.
- bool IsWithinResizingArea(const gfx::Point& mouse_location) const;
-
- static const char kViewClassName[];
-
- bool is_frameless_;
- PanelView* panel_view_;
- views::ImageButton* close_button_;
- views::ImageButton* minimize_button_;
- views::ImageButton* restore_button_;
- TabIconView* title_icon_;
- views::Label* title_label_;
- panel::CornerStyle corner_style_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelFrameView);
-};
-
-#endif // CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_FRAME_VIEW_H_
« no previous file with comments | « chrome/browser/ui/views/panels/OWNERS ('k') | chrome/browser/ui/views/panels/panel_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698