| Index: chrome/browser/ui/views/sidebar/sidebar_tab_strip_host.h
|
| ===================================================================
|
| --- chrome/browser/ui/views/sidebar/sidebar_tab_strip_host.h (revision 0)
|
| +++ chrome/browser/ui/views/sidebar/sidebar_tab_strip_host.h (revision 0)
|
| @@ -0,0 +1,74 @@
|
| +// Copyright (c) 2010 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_SIDEBAR_SIDEBAR_TAB_STRIP_HOST_H_
|
| +#define CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_HOST_H_
|
| +#pragma once
|
| +
|
| +#include "base/scoped_ptr.h"
|
| +#include "gfx/native_widget_types.h"
|
| +
|
| +class BrowserView;
|
| +class SidebarBaseTabStrip;
|
| +
|
| +namespace gfx {
|
| +class Rect;
|
| +class Size;
|
| +}
|
| +
|
| +namespace views {
|
| +class View;
|
| +class Widget;
|
| +}
|
| +
|
| +// SidebarTabStripHost implements the container widget for the UI that
|
| +// is shown on top of the browser contents. It uses the appropriate
|
| +// implementation from sidebar_tab_strip_host_win.cc or
|
| +// sidebar_tab_strip_host_gtk.cc to draw its content and is responsible
|
| +// for showing, hiding and resizing the host widget and keeping widget shape
|
| +// in sync with sidebar tab strip.
|
| +class SidebarTabStripHost {
|
| + public:
|
| + explicit SidebarTabStripHost(BrowserView* browser_view);
|
| + virtual ~SidebarTabStripHost();
|
| +
|
| + // Initializes the dropdown bar host with the given view.
|
| + void Init(SidebarBaseTabStrip* view);
|
| +
|
| + // Moves the widget to the provided location, moves it to top
|
| + // in the z-order (HWND_TOP, not HWND_TOPMOST for windows) and shows
|
| + // the widget if new_pos is not empty, hides it otherwise.
|
| + virtual void SetPosition(const gfx::Rect& new_pos);
|
| +
|
| + // Updates host widget to match the shape of the tab strip.
|
| + void UpdateWindowEdges();
|
| +
|
| + // Returns the size of the widget's contents view.
|
| + gfx::Size GetContentsSize() const;
|
| +
|
| + protected:
|
| + // Returns the sidebar tab strip view.
|
| + SidebarBaseTabStrip* view() const { return view_; }
|
| +
|
| + // Creates and returns the native Widget.
|
| + views::Widget* CreateHost();
|
| +
|
| + // Allows platform implementation to tweak widget position.
|
| + void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw);
|
| +
|
| + private:
|
| + // The BrowserView that created us.
|
| + BrowserView* const browser_view_;
|
| +
|
| + // Our view, which is responsible for drawing the UI.
|
| + SidebarBaseTabStrip* view_;
|
| +
|
| + // Host widget.
|
| + scoped_ptr<views::Widget> host_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SidebarTabStripHost);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_HOST_H_
|
| +
|
|
|
| Property changes on: chrome\browser\ui\views\sidebar\sidebar_tab_strip_host.h
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|