OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/views/frame/browser_root_view.h" | 5 #include "chrome/browser/views/frame/browser_root_view.h" |
6 | 6 |
| 7 #include "app/drag_drop_types.h" |
| 8 #include "app/os_exchange_data.h" |
7 #include "chrome/browser/views/frame/browser_view.h" | 9 #include "chrome/browser/views/frame/browser_view.h" |
8 #include "chrome/browser/views/frame/browser_frame.h" | 10 #include "chrome/browser/views/frame/browser_frame.h" |
9 #include "chrome/browser/views/tabs/tab_strip.h" | 11 #include "chrome/browser/views/tabs/tab_strip.h" |
10 #include "chrome/common/drag_drop_types.h" | |
11 #include "chrome/common/os_exchange_data.h" | |
12 | 12 |
13 BrowserRootView::BrowserRootView(views::Widget* widget) | 13 BrowserRootView::BrowserRootView(views::Widget* widget) |
14 : views::RootView(widget), | 14 : views::RootView(widget), |
15 tabstrip_(NULL), | 15 tabstrip_(NULL), |
16 can_drop_(false), | 16 can_drop_(false), |
17 forwarding_to_tab_strip_(false) { | 17 forwarding_to_tab_strip_(false) { |
18 } | 18 } |
19 | 19 |
20 bool BrowserRootView::CanDrop(const OSExchangeData& data) { | 20 bool BrowserRootView::CanDrop(const OSExchangeData& data) { |
21 tabstrip_ = | 21 tabstrip_ = |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 views::DropTargetEvent* BrowserRootView::MapEventToTabStrip( | 83 views::DropTargetEvent* BrowserRootView::MapEventToTabStrip( |
84 const views::DropTargetEvent& event) { | 84 const views::DropTargetEvent& event) { |
85 gfx::Point tab_strip_loc(event.location()); | 85 gfx::Point tab_strip_loc(event.location()); |
86 ConvertPointToView(this, tabstrip_, &tab_strip_loc); | 86 ConvertPointToView(this, tabstrip_, &tab_strip_loc); |
87 return new views::DropTargetEvent(event.GetData(), tab_strip_loc.x(), | 87 return new views::DropTargetEvent(event.GetData(), tab_strip_loc.x(), |
88 tab_strip_loc.y(), | 88 tab_strip_loc.y(), |
89 event.GetSourceOperations()); | 89 event.GetSourceOperations()); |
90 } | 90 } |
OLD | NEW |