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