diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 07:35:32 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 07:35:32 +0000 |
commit | 213dac2f0bff9162502fe325b6ebb85a255efcb2 (patch) | |
tree | 3640cb1f19976e38677b8632537d2d41f8444d0f /chrome/browser/views/frame/browser_root_view.h | |
parent | 6de53d401aa8dc6c7e0a9874c71a95ce88ade50d (diff) | |
download | chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.zip chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.tar.gz chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.tar.bz2 |
Move browser/views to browser/ui/views
TBR=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4694005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame/browser_root_view.h')
-rw-r--r-- | chrome/browser/views/frame/browser_root_view.h | 62 |
1 files changed, 6 insertions, 56 deletions
diff --git a/chrome/browser/views/frame/browser_root_view.h b/chrome/browser/views/frame/browser_root_view.h index 4ae382a..bf129da 100644 --- a/chrome/browser/views/frame/browser_root_view.h +++ b/chrome/browser/views/frame/browser_root_view.h @@ -1,63 +1,13 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ -#define CHROME_BROWSER_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ +#ifndef CHROME_BROWSER_VIEWS_FRAME_POPUP_BROWSER_ROOT_VIEW_H_ +#define CHROME_BROWSER_VIEWS_FRAME_POPUP_BROWSER_ROOT_VIEW_H_ #pragma once -#include "views/widget/root_view.h" +#include "chrome/browser/ui/views/frame/browser_root_view.h" +// TODO(beng): remove this file once all includes have been updated. -class BrowserView; -class OSExchangeData; -class BaseTabStrip; +#endif // CHROME_BROWSER_VIEWS_FRAME_POPUP_BROWSER_ROOT_VIEW_H_ -// RootView implementation used by BrowserFrame. This forwards drop events to -// the TabStrip. Visually the tabstrip extends to the top of the frame, but in -// actually it doesn't. The tabstrip is only as high as a tab. To enable -// dropping above the tabstrip BrowserRootView forwards drop events to the -// TabStrip. -class BrowserRootView : public views::RootView { - public: - // You must call set_tabstrip before this class will accept drops. - BrowserRootView(BrowserView* browser_view, views::Widget* widget); - - virtual bool GetDropFormats( - int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats); - virtual bool AreDropTypesRequired(); - virtual bool CanDrop(const OSExchangeData& data); - virtual void OnDragEntered(const views::DropTargetEvent& event); - virtual int OnDragUpdated(const views::DropTargetEvent& event); - virtual void OnDragExited(); - virtual int OnPerformDrop(const views::DropTargetEvent& event); - - private: - // Returns true if the event should be forwarded to the tabstrip. - bool ShouldForwardToTabStrip(const views::DropTargetEvent& event); - - // Converts the event from the hosts coordinate system to the tabstrips - // coordinate system. - views::DropTargetEvent* MapEventToTabStrip( - const views::DropTargetEvent& event, - const OSExchangeData& data); - - inline BaseTabStrip* tabstrip() const; - - // Returns true if |data| has string contents and the user can "paste and go". - // If |url| is non-NULL and the user can "paste and go", |url| is set to the - // desired destination. - bool GetPasteAndGoURL(const OSExchangeData& data, GURL* url); - - // The BrowserView. - BrowserView* browser_view_; - - // If true, drag and drop events are being forwarded to the tab strip. - // This is used to determine when to send OnDragEntered and OnDragExited - // to the tab strip. - bool forwarding_to_tab_strip_; - - DISALLOW_COPY_AND_ASSIGN(BrowserRootView); -}; - -#endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ |