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

Unified Diff: chrome/browser/ui/panels/panel_browser_frame_view.h

Issue 10908153: [Panel refactor] Deprecate old panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_chromeos test failure Created 8 years, 3 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/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_frame_view.h
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.h b/chrome/browser/ui/panels/panel_browser_frame_view.h
deleted file mode 100644
index 98216be46125a007e8d1449e973d0bf9836020ac..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/panels/panel_browser_frame_view.h
+++ /dev/null
@@ -1,147 +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_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
-#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
-
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/message_loop.h"
-#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
-#include "chrome/browser/ui/views/tab_icon_view_model.h"
-#include "ui/views/controls/button/button.h"
-
-class PanelBrowserView;
-class SkPaint;
-class TabIconView;
-
-namespace gfx {
-class Font;
-class ImageSkia;
-}
-namespace ui {
-class LinearAnimation;
-}
-namespace views {
-class ImageButton;
-class Label;
-}
-
-class PanelBrowserFrameView : public BrowserNonClientFrameView,
- public views::ButtonListener,
- public chrome::TabIconViewModel {
- public:
- PanelBrowserFrameView(BrowserFrame* frame, PanelBrowserView* browser_view);
- virtual ~PanelBrowserFrameView();
-
- void UpdateTitleBar();
- void UpdateTitleBarMinimizeRestoreButtonVisibility();
-
- // Returns the height of the entire nonclient top border, including the window
- // frame, any title area, and any connected client edge.
- int NonClientTopBorderHeight() const;
-
- // Returns the size of the non-client area, that is, the window size minus
- // the size of the client area.
- gfx::Size NonClientAreaSize() const;
-
- // Returns true if the frame window is showing only the titlebar.
- bool IsShowingTitlebarOnly() const;
-
- protected:
- // Overridden from BrowserNonClientFrameView:
- virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE;
- virtual TabStripInsets GetTabStripInsets(bool restored) const OVERRIDE;
- virtual int GetThemeBackgroundXInset() const OVERRIDE;
- virtual void UpdateThrobber(bool running) OVERRIDE;
-
- // Overridden from views::NonClientFrameView:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
- virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
- virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask)
- OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
-
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnThemeChanged() OVERRIDE;
- virtual gfx::Size GetMinimumSize() OVERRIDE;
- virtual gfx::Size GetMaximumSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender, const ui::Event& event)
- OVERRIDE;
-
- // Overridden from chrome::TabIconViewModel:
- virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
- virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE;
-
- private:
- friend class PanelBrowserViewTest;
- friend class NativePanelTestingWin;
-
- enum PaintState {
- NOT_PAINTED,
- PAINT_AS_INACTIVE,
- PAINT_AS_ACTIVE,
- PAINT_AS_MINIMIZED,
- PAINT_FOR_ATTENTION
- };
-
- // Returns the thickness of the entire nonclient left, right, and bottom
- // borders, including both the window frame and any client edge.
- int NonClientBorderThickness() const;
-
- // Returns the width of the panel that is showing only an icon.
- int IconOnlyWidth() 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);
- void PaintDivider(gfx::Canvas* canvas);
-
- // Retrieves the drawing metrics based on the current painting state.
- SkColor GetTitleColor(PaintState paint_state) const;
- SkColor GetDefaultTitleColor(PaintState paint_state) const;
- SkColor GetThemedTitleColor(PaintState paint_state) const;
-
- const gfx::ImageSkia* GetFrameBackground(PaintState paint_state) const;
- const gfx::ImageSkia* GetDefaultFrameBackground(PaintState paint_state) const;
- const gfx::ImageSkia* GetThemedFrameBackground(PaintState paint_state) const;
-
- bool UsingDefaultTheme(PaintState paint_state) const;
-
- string16 GetTitleText() const;
-
- bool CanResize() const;
-
- // The client view hosted within this non-client frame view that is
- // guaranteed to be freed before the client view.
- // (see comments about view hierarchies in non_client_view.h)
- PanelBrowserView* panel_browser_view_;
-
- PaintState paint_state_;
- views::ImageButton* close_button_;
- views::ImageButton* minimize_button_;
- views::ImageButton* restore_button_;
- TabIconView* title_icon_;
- views::Label* title_label_;
- gfx::Rect client_view_bounds_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView);
-};
-
-#endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698