| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ |
| 7 | 7 |
| 8 #include "ui/views/widget/root_view.h" | 8 #include "ui/views/widget/root_view.h" |
| 9 | 9 |
| 10 class BrowserView; | 10 class BrowserView; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 int* formats, | 32 int* formats, |
| 33 std::set<ui::Clipboard::FormatType>* format_types) override; | 33 std::set<ui::Clipboard::FormatType>* format_types) override; |
| 34 bool AreDropTypesRequired() override; | 34 bool AreDropTypesRequired() override; |
| 35 bool CanDrop(const ui::OSExchangeData& data) override; | 35 bool CanDrop(const ui::OSExchangeData& data) override; |
| 36 void OnDragEntered(const ui::DropTargetEvent& event) override; | 36 void OnDragEntered(const ui::DropTargetEvent& event) override; |
| 37 int OnDragUpdated(const ui::DropTargetEvent& event) override; | 37 int OnDragUpdated(const ui::DropTargetEvent& event) override; |
| 38 void OnDragExited() override; | 38 void OnDragExited() override; |
| 39 int OnPerformDrop(const ui::DropTargetEvent& event) override; | 39 int OnPerformDrop(const ui::DropTargetEvent& event) override; |
| 40 const char* GetClassName() const override; | 40 const char* GetClassName() const override; |
| 41 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; | 41 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; |
| 42 void OnMouseExited(const ui::MouseEvent& event) override; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 // ui::EventProcessor: | 45 // ui::EventProcessor: |
| 45 void OnEventProcessingStarted(ui::Event* event) override; | 46 void OnEventProcessingStarted(ui::Event* event) override; |
| 46 | 47 |
| 47 // Returns true if the event should be forwarded to the tabstrip. | 48 // Returns true if the event should be forwarded to the tabstrip. |
| 48 bool ShouldForwardToTabStrip(const ui::DropTargetEvent& event); | 49 bool ShouldForwardToTabStrip(const ui::DropTargetEvent& event); |
| 49 | 50 |
| 50 // Converts the event from the hosts coordinate system to the tabstrips | 51 // Converts the event from the hosts coordinate system to the tabstrips |
| 51 // coordinate system. | 52 // coordinate system. |
| 52 ui::DropTargetEvent* MapEventToTabStrip( | 53 ui::DropTargetEvent* MapEventToTabStrip( |
| 53 const ui::DropTargetEvent& event, | 54 const ui::DropTargetEvent& event, |
| 54 const ui::OSExchangeData& data); | 55 const ui::OSExchangeData& data); |
| 55 | 56 |
| 56 inline TabStrip* tabstrip() const; | 57 inline TabStrip* tabstrip() const; |
| 57 | 58 |
| 58 // Returns true if |data| has string contents and the user can "paste and go". | 59 // Returns true if |data| has string contents and the user can "paste and go". |
| 59 // If |url| is non-null and the user can "paste and go", |url| is set to the | 60 // If |url| is non-null and the user can "paste and go", |url| is set to the |
| 60 // desired destination. | 61 // desired destination. |
| 61 bool GetPasteAndGoURL(const ui::OSExchangeData& data, GURL* url); | 62 bool GetPasteAndGoURL(const ui::OSExchangeData& data, GURL* url); |
| 62 | 63 |
| 63 // The BrowserView. | 64 // The BrowserView. |
| 64 BrowserView* browser_view_; | 65 BrowserView* browser_view_; |
| 65 | 66 |
| 66 // If true, drag and drop events are being forwarded to the tab strip. | 67 // If true, drag and drop events are being forwarded to the tab strip. |
| 67 // This is used to determine when to send OnDragEntered and OnDragExited | 68 // This is used to determine when to send OnDragEntered and OnDragExited |
| 68 // to the tab strip. | 69 // to the tab strip. |
| 69 bool forwarding_to_tab_strip_; | 70 bool forwarding_to_tab_strip_; |
| 70 | 71 |
| 72 // Used to calculate partial offsets in scrolls that occur for a smooth |
| 73 // scroll device. |
| 74 int scroll_amount_x_; |
| 75 int scroll_amount_y_; |
| 76 |
| 71 DISALLOW_COPY_AND_ASSIGN(BrowserRootView); | 77 DISALLOW_COPY_AND_ASSIGN(BrowserRootView); |
| 72 }; | 78 }; |
| 73 | 79 |
| 74 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ | 80 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_ROOT_VIEW_H_ |
| OLD | NEW |