| 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 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windowsx.h> | 8 #include <windowsx.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 file_supported(true) { | 2314 file_supported(true) { |
| 2315 arrow_view = new views::ImageView; | 2315 arrow_view = new views::ImageView; |
| 2316 arrow_view->SetImage(GetDropArrowImage(point_down)); | 2316 arrow_view->SetImage(GetDropArrowImage(point_down)); |
| 2317 | 2317 |
| 2318 arrow_window = new views::Widget; | 2318 arrow_window = new views::Widget; |
| 2319 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 2319 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
| 2320 params.keep_on_top = true; | 2320 params.keep_on_top = true; |
| 2321 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 2321 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 2322 params.accept_events = false; | 2322 params.accept_events = false; |
| 2323 params.bounds = gfx::Rect(drop_indicator_width, drop_indicator_height); | 2323 params.bounds = gfx::Rect(drop_indicator_width, drop_indicator_height); |
| 2324 params.context = context->GetNativeView(); | 2324 params.context = context->GetNativeWindow(); |
| 2325 arrow_window->Init(params); | 2325 arrow_window->Init(params); |
| 2326 arrow_window->SetContentsView(arrow_view); | 2326 arrow_window->SetContentsView(arrow_view); |
| 2327 } | 2327 } |
| 2328 | 2328 |
| 2329 TabStrip::DropInfo::~DropInfo() { | 2329 TabStrip::DropInfo::~DropInfo() { |
| 2330 // Close eventually deletes the window, which deletes arrow_view too. | 2330 // Close eventually deletes the window, which deletes arrow_view too. |
| 2331 arrow_window->Close(); | 2331 arrow_window->Close(); |
| 2332 } | 2332 } |
| 2333 | 2333 |
| 2334 /////////////////////////////////////////////////////////////////////////////// | 2334 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2713 action = TouchUMA::GESTURE_TABSWITCH_TAP; | 2713 action = TouchUMA::GESTURE_TABSWITCH_TAP; |
| 2714 TouchUMA::RecordGestureAction(action); | 2714 TouchUMA::RecordGestureAction(action); |
| 2715 break; | 2715 break; |
| 2716 } | 2716 } |
| 2717 | 2717 |
| 2718 default: | 2718 default: |
| 2719 break; | 2719 break; |
| 2720 } | 2720 } |
| 2721 event->SetHandled(); | 2721 event->SetHandled(); |
| 2722 } | 2722 } |
| OLD | NEW |