summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-01 00:31:26 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-01 00:31:26 +0000
commit7db65fdab1d5f59df3bc6c4ed49dd6e0fd4facff (patch)
tree31e5077928779e7fc23081c2c283106387387d7f /chrome/browser/views
parentda5ff696c0007cdb6ded17a9d4fecf6d4294993e (diff)
downloadchromium_src-7db65fdab1d5f59df3bc6c4ed49dd6e0fd4facff.zip
chromium_src-7db65fdab1d5f59df3bc6c4ed49dd6e0fd4facff.tar.gz
chromium_src-7db65fdab1d5f59df3bc6c4ed49dd6e0fd4facff.tar.bz2
Make BrowserView implement the BrowserWindow interface so we can start moving frame functionality into it.
B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/browser_view.cc159
-rw-r--r--chrome/browser/views/frame/browser_view.h43
2 files changed, 201 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index e5e81fb..cdbd9c9 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -29,9 +29,168 @@
#include "chrome/browser/views/frame/browser_view.h"
+#include "chrome/browser/profile.h"
+#include "chrome/browser/tab_contents.h"
+#include "chrome/browser/tabs/tab_strip.h"
+#include "chrome/browser/views/bookmark_bar_view.h"
+#include "chrome/browser/views/go_button.h"
+#include "chrome/browser/views/location_bar_view.h"
+#include "chrome/browser/views/status_bubble.h"
+#include "chrome/browser/views/toolbar_star_toggle.h"
+
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
+BrowserView::BrowserView(ChromeViews::Window* window,
+ ChromeViews::View* contents_view)
+ : ClientView(window, contents_view) {
+}
+
+BrowserView::~BrowserView() {
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// BrowserView, BrowserWindow implementation:
+
+void BrowserView::Init() {
+
+}
+
+void BrowserView::Show(int command, bool adjust_to_fit) {
+
+}
+
+void BrowserView::BrowserDidPaint(HRGN region) {
+
+}
+
+void BrowserView::Close() {
+
+}
+
+void* BrowserView::GetPlatformID() {
+ return NULL;
+}
+
+TabStrip* BrowserView::GetTabStrip() const {
+ return NULL;
+}
+
+StatusBubble* BrowserView::GetStatusBubble() {
+ return NULL;
+}
+
+ChromeViews::RootView* BrowserView::GetRootView() {
+ return NULL;
+}
+
+void BrowserView::ShelfVisibilityChanged() {
+
+}
+
+void BrowserView::SelectedTabToolbarSizeChanged(bool is_animating) {
+
+}
+
+void BrowserView::UpdateTitleBar() {
+
+}
+
+void BrowserView::SetWindowTitle(const std::wstring& title) {
+
+}
+
+void BrowserView::Activate() {
+
+}
+
+void BrowserView::FlashFrame() {
+
+}
+
+void BrowserView::ShowTabContents(TabContents* contents) {
+
+}
+
+void BrowserView::ContinueDetachConstrainedWindowDrag(
+ const gfx::Point& mouse_pt,
+ int frame_component) {
+
+}
+
+void BrowserView::SizeToContents(const gfx::Rect& contents_bounds) {
+
+}
+
+void BrowserView::SetAcceleratorTable(
+ std::map<ChromeViews::Accelerator, int>* accelerator_table) {
+
+}
+
+void BrowserView::ValidateThrobber() {
+
+}
+
+gfx::Rect BrowserView::GetNormalBounds() {
+ return gfx::Rect();
+}
+
+bool BrowserView::IsMaximized() {
+ return false;
+}
+
+gfx::Rect BrowserView::GetBoundsForContentBounds(const gfx::Rect content_rect) {
+ return gfx::Rect();
+}
+
+void BrowserView::SetBounds(const gfx::Rect& bounds) {
+
+}
+
+void BrowserView::DetachFromBrowser() {
+
+}
+
+void BrowserView::InfoBubbleShowing() {
+
+}
+
+void BrowserView::InfoBubbleClosing() {
+
+}
+
+ToolbarStarToggle* BrowserView::GetStarButton() const {
+ return NULL;
+}
+
+LocationBarView* BrowserView::GetLocationBarView() const {
+ return NULL;
+}
+
+GoButton* BrowserView::GetGoButton() const {
+ return NULL;
+}
+
+BookmarkBarView* BrowserView::GetBookmarkBarView() {
+ return NULL;
+}
+
+void BrowserView::Update(TabContents* contents, bool should_restore_state) {
+
+}
+
+void BrowserView::ProfileChanged(Profile* profile) {
+
+}
+
+void BrowserView::FocusToolbar() {
+
+}
+
+void BrowserView::DestroyBrowser() {
+
+}
+
///////////////////////////////////////////////////////////////////////////////
// BrowserView, ChromeViews::ClientView overrides:
diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h
index e96df7b..7f59388 100644
--- a/chrome/browser/views/frame/browser_view.h
+++ b/chrome/browser/views/frame/browser_view.h
@@ -30,6 +30,7 @@
#ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_
#define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_
+#include "chrome/browser/browser_window.h"
#include "chrome/views/client_view.h"
// NOTE: For more information about the objects and files in this directory,
@@ -41,11 +42,51 @@
// A ClientView subclass that provides the contents of a browser window,
// including the TabStrip, toolbars, download shelves, the content area etc.
//
-class BrowserView : public ChromeViews::ClientView {
+class BrowserView : public BrowserWindow,
+ public ChromeViews::ClientView {
public:
BrowserView(ChromeViews::Window* window, ChromeViews::View* contents_view);
virtual ~BrowserView();
+ // Overridden from BrowserWindow:
+ virtual void Init();
+ virtual void Show(int command, bool adjust_to_fit);
+ virtual void BrowserDidPaint(HRGN region);
+ virtual void Close();
+ virtual void* GetPlatformID();
+ virtual TabStrip* GetTabStrip() const;
+ virtual StatusBubble* GetStatusBubble();
+ virtual ChromeViews::RootView* GetRootView();
+ virtual void ShelfVisibilityChanged();
+ virtual void SelectedTabToolbarSizeChanged(bool is_animating);
+ virtual void UpdateTitleBar();
+ virtual void SetWindowTitle(const std::wstring& title);
+ virtual void Activate();
+ virtual void FlashFrame();
+ virtual void ShowTabContents(TabContents* contents);
+ virtual void ContinueDetachConstrainedWindowDrag(
+ const gfx::Point& mouse_pt,
+ int frame_component);
+ virtual void SizeToContents(const gfx::Rect& contents_bounds);
+ virtual void SetAcceleratorTable(
+ std::map<ChromeViews::Accelerator, int>* accelerator_table);
+ virtual void ValidateThrobber();
+ virtual gfx::Rect GetNormalBounds();
+ virtual bool IsMaximized();
+ virtual gfx::Rect GetBoundsForContentBounds(const gfx::Rect content_rect);
+ virtual void SetBounds(const gfx::Rect& bounds);
+ virtual void DetachFromBrowser();
+ virtual void InfoBubbleShowing();
+ virtual void InfoBubbleClosing();
+ virtual ToolbarStarToggle* GetStarButton() const;
+ virtual LocationBarView* GetLocationBarView() const;
+ virtual GoButton* GetGoButton() const;
+ virtual BookmarkBarView* GetBookmarkBarView();
+ virtual void Update(TabContents* contents, bool should_restore_state);
+ virtual void ProfileChanged(Profile* profile);
+ virtual void FocusToolbar();
+ virtual void DestroyBrowser();
+
// Overridden from ChromeViews::ClientView:
virtual bool CanClose() const;
virtual int NonClientHitTest(const gfx::Point& point);