| 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 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 point_down(point_down), | 2344 point_down(point_down), |
| 2345 file_supported(true) { | 2345 file_supported(true) { |
| 2346 arrow_view = new views::ImageView; | 2346 arrow_view = new views::ImageView; |
| 2347 arrow_view->SetImage(GetDropArrowImage(point_down)); | 2347 arrow_view->SetImage(GetDropArrowImage(point_down)); |
| 2348 | 2348 |
| 2349 arrow_window = new views::Widget; | 2349 arrow_window = new views::Widget; |
| 2350 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 2350 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
| 2351 params.keep_on_top = true; | 2351 params.keep_on_top = true; |
| 2352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 2352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 2353 params.accept_events = false; | 2353 params.accept_events = false; |
| 2354 params.can_activate = false; | |
| 2355 params.bounds = gfx::Rect(drop_indicator_width, drop_indicator_height); | 2354 params.bounds = gfx::Rect(drop_indicator_width, drop_indicator_height); |
| 2356 params.context = context->GetNativeView(); | 2355 params.context = context->GetNativeView(); |
| 2357 arrow_window->Init(params); | 2356 arrow_window->Init(params); |
| 2358 arrow_window->SetContentsView(arrow_view); | 2357 arrow_window->SetContentsView(arrow_view); |
| 2359 } | 2358 } |
| 2360 | 2359 |
| 2361 TabStrip::DropInfo::~DropInfo() { | 2360 TabStrip::DropInfo::~DropInfo() { |
| 2362 // Close eventually deletes the window, which deletes arrow_view too. | 2361 // Close eventually deletes the window, which deletes arrow_view too. |
| 2363 arrow_window->Close(); | 2362 arrow_window->Close(); |
| 2364 } | 2363 } |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 else | 2645 else |
| 2647 RemoveMessageLoopObserver(); | 2646 RemoveMessageLoopObserver(); |
| 2648 } | 2647 } |
| 2649 | 2648 |
| 2650 bool TabStrip::GetAdjustLayout() const { | 2649 bool TabStrip::GetAdjustLayout() const { |
| 2651 if (!adjust_layout_) | 2650 if (!adjust_layout_) |
| 2652 return false; | 2651 return false; |
| 2653 return chrome::GetHostDesktopTypeForNativeView( | 2652 return chrome::GetHostDesktopTypeForNativeView( |
| 2654 GetWidget()->GetNativeView()) == chrome::HOST_DESKTOP_TYPE_ASH; | 2653 GetWidget()->GetNativeView()) == chrome::HOST_DESKTOP_TYPE_ASH; |
| 2655 } | 2654 } |
| OLD | NEW |