| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "ui/gfx/screen.h" | 45 #include "ui/gfx/screen.h" |
| 46 #include "ui/gfx/size.h" | 46 #include "ui/gfx/size.h" |
| 47 #include "ui/views/controls/image_view.h" | 47 #include "ui/views/controls/image_view.h" |
| 48 #include "ui/views/mouse_watcher_view_host.h" | 48 #include "ui/views/mouse_watcher_view_host.h" |
| 49 #include "ui/views/view_model_utils.h" | 49 #include "ui/views/view_model_utils.h" |
| 50 #include "ui/views/widget/root_view.h" | 50 #include "ui/views/widget/root_view.h" |
| 51 #include "ui/views/widget/widget.h" | 51 #include "ui/views/widget/widget.h" |
| 52 #include "ui/views/window/non_client_view.h" | 52 #include "ui/views/window/non_client_view.h" |
| 53 | 53 |
| 54 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
| 55 #include "ui/base/win/hwnd_util.h" | 55 #include "ui/gfx/win/hwnd_util.h" |
| 56 #include "ui/views/widget/monitor_win.h" | 56 #include "ui/views/widget/monitor_win.h" |
| 57 #include "win8/util/win8_util.h" | 57 #include "win8/util/win8_util.h" |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 using content::UserMetricsAction; | 60 using content::UserMetricsAction; |
| 61 using ui::DropTargetEvent; | 61 using ui::DropTargetEvent; |
| 62 | 62 |
| 63 namespace { | 63 namespace { |
| 64 | 64 |
| 65 static const int kTabStripAnimationVSlop = 40; | 65 static const int kTabStripAnimationVSlop = 40; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 path->close(); | 373 path->close(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 #if defined(OS_WIN) && !defined(USE_AURA) | 376 #if defined(OS_WIN) && !defined(USE_AURA) |
| 377 void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) { | 377 void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) { |
| 378 if (event.IsOnlyRightMouseButton()) { | 378 if (event.IsOnlyRightMouseButton()) { |
| 379 gfx::Point point = event.location(); | 379 gfx::Point point = event.location(); |
| 380 views::View::ConvertPointToScreen(this, &point); | 380 views::View::ConvertPointToScreen(this, &point); |
| 381 bool destroyed = false; | 381 bool destroyed = false; |
| 382 destroyed_ = &destroyed; | 382 destroyed_ = &destroyed; |
| 383 ui::ShowSystemMenuAtPoint(GetWidget()->GetNativeView(), point); | 383 gfx::ShowSystemMenuAtPoint(GetWidget()->GetNativeView(), point); |
| 384 if (destroyed) | 384 if (destroyed) |
| 385 return; | 385 return; |
| 386 | 386 |
| 387 destroyed_ = NULL; | 387 destroyed_ = NULL; |
| 388 SetState(views::CustomButton::STATE_NORMAL); | 388 SetState(views::CustomButton::STATE_NORMAL); |
| 389 return; | 389 return; |
| 390 } | 390 } |
| 391 views::ImageButton::OnMouseReleased(event); | 391 views::ImageButton::OnMouseReleased(event); |
| 392 } | 392 } |
| 393 #endif | 393 #endif |
| (...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 if (!adjust_layout_) | 2712 if (!adjust_layout_) |
| 2713 return false; | 2713 return false; |
| 2714 | 2714 |
| 2715 #if !defined(OS_CHROMEOS) | 2715 #if !defined(OS_CHROMEOS) |
| 2716 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) | 2716 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) |
| 2717 return false; | 2717 return false; |
| 2718 #endif | 2718 #endif |
| 2719 | 2719 |
| 2720 return true; | 2720 return true; |
| 2721 } | 2721 } |
| OLD | NEW |