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