| Index: chrome/browser/views/frame/embedded_non_client_view.h
|
| ===================================================================
|
| --- chrome/browser/views/frame/embedded_non_client_view.h (revision 0)
|
| +++ chrome/browser/views/frame/embedded_non_client_view.h (revision 0)
|
| @@ -0,0 +1,72 @@
|
| +// Copyright (c) 2006-2008 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_VIEWS_FRAME_EMBEDDED_NON_CLIENT_VIEW_H_
|
| +#define CHROME_BROWSER_VIEWS_FRAME_EMBEDDED_NON_CLIENT_VIEW_H_
|
| +
|
| +#include "chrome/browser/views/frame/embedded_frame.h"
|
| +#include "chrome/browser/views/tab_icon_view.h"
|
| +#include "chrome/views/non_client_view.h"
|
| +#include "chrome/views/button.h"
|
| +
|
| +class BrowserView;
|
| +class EmbeddedFrame;
|
| +class TabContents;
|
| +class TabStrip;
|
| +namespace views {
|
| +class WindowResources;
|
| +}
|
| +
|
| +class EmbeddedNonClientView : public views::NonClientView,
|
| + public views::BaseButton::ButtonListener,
|
| + public TabIconView::TabContentsProvider {
|
| + public:
|
| + // Constructs a non-client view for an EmbeddedFrame.
|
| + EmbeddedNonClientView(EmbeddedFrame* frame, BrowserView* browser_view);
|
| + virtual ~EmbeddedNonClientView();
|
| +
|
| + protected:
|
| + // Overridden from TabIconView::TabContentsProvider:
|
| + virtual TabContents* GetCurrentTabContents();
|
| + virtual SkBitmap GetFavIcon();
|
| +
|
| + // Overridden from views::BaseButton::ButtonListener:
|
| + virtual void ButtonPressed(views::BaseButton* sender);
|
| +
|
| + // Overridden from views::NonClientView:
|
| + virtual gfx::Rect CalculateClientAreaBounds(int width, int height) const;
|
| + virtual gfx::Size CalculateWindowSizeForClientSize(int width,
|
| + int height) const;
|
| + virtual CPoint GetSystemMenuPoint() const;
|
| + virtual int NonClientHitTest(const gfx::Point& point);
|
| + virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask);
|
| + virtual void EnableClose(bool enable);
|
| + virtual void ResetWindowControls();
|
| +
|
| + // Overridden from views::View:
|
| + virtual void Paint(ChromeCanvas* canvas);
|
| + virtual void Layout();
|
| + virtual gfx::Size GetPreferredSize();
|
| + virtual void ViewHierarchyChanged(bool is_add,
|
| + views::View* parent,
|
| + views::View* embedded);
|
| + virtual bool GetAccessibleRole(VARIANT* role);
|
| + virtual bool GetAccessibleName(std::wstring* name);
|
| + virtual void SetAccessibleName(const std::wstring& name);
|
| +
|
| + private:
|
| + // The frame that hosts this view.
|
| + EmbeddedFrame* frame_;
|
| +
|
| + // The BrowserView hosted within this View.
|
| + BrowserView* browser_view_;
|
| +
|
| + // The accessible name of this view.
|
| + std::wstring accessible_name_;
|
| +
|
| + DISALLOW_EVIL_CONSTRUCTORS(EmbeddedNonClientView);
|
| +};
|
| +
|
| +#endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_EMBEDDED_NON_CLIENT_VIEW_H_
|
| +
|
|
|