| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // were we destroyed? | 315 // were we destroyed? |
| 316 bool* destroyed_; | 316 bool* destroyed_; |
| 317 | 317 |
| 318 DISALLOW_COPY_AND_ASSIGN(NewTabButton); | 318 DISALLOW_COPY_AND_ASSIGN(NewTabButton); |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener) | 321 NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener) |
| 322 : views::ImageButton(listener), | 322 : views::ImageButton(listener), |
| 323 tab_strip_(tab_strip), | 323 tab_strip_(tab_strip), |
| 324 destroyed_(NULL) { | 324 destroyed_(NULL) { |
| 325 set_animate_on_state_change(true); |
| 325 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 326 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 326 set_triggerable_event_flags(triggerable_event_flags() | | 327 set_triggerable_event_flags(triggerable_event_flags() | |
| 327 ui::EF_MIDDLE_MOUSE_BUTTON); | 328 ui::EF_MIDDLE_MOUSE_BUTTON); |
| 328 #endif | 329 #endif |
| 329 } | 330 } |
| 330 | 331 |
| 331 NewTabButton::~NewTabButton() { | 332 NewTabButton::~NewTabButton() { |
| 332 if (destroyed_) | 333 if (destroyed_) |
| 333 *destroyed_ = true; | 334 *destroyed_ = true; |
| 334 } | 335 } |
| (...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2801 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2802 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
| 2802 if (view) | 2803 if (view) |
| 2803 return view; | 2804 return view; |
| 2804 } | 2805 } |
| 2805 Tab* tab = FindTabForEvent(point); | 2806 Tab* tab = FindTabForEvent(point); |
| 2806 if (tab) | 2807 if (tab) |
| 2807 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2808 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
| 2808 } | 2809 } |
| 2809 return this; | 2810 return this; |
| 2810 } | 2811 } |
| OLD | NEW |