| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/dropdown_bar_host.h" | 5 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/view_ids.h" | 9 #include "chrome/browser/ui/view_ids.h" |
| 10 #include "chrome/browser/ui/views/dropdown_bar_view.h" | 10 #include "chrome/browser/ui/views/dropdown_bar_view.h" |
| 11 #include "chrome/browser/ui/views/frame/browser_view.h" | 11 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 12 #include "gfx/path.h" | 12 #include "gfx/path.h" |
| 13 #include "gfx/scrollbar_size.h" | 13 #include "gfx/scrollbar_size.h" |
| 14 #include "ui/base/animation/slide_animation.h" | 14 #include "ui/base/animation/slide_animation.h" |
| 15 #include "ui/base/keycodes/keyboard_codes.h" | 15 #include "ui/base/keycodes/keyboard_codes.h" |
| 16 #include "views/focus/external_focus_tracker.h" | 16 #include "views/focus/external_focus_tracker.h" |
| 17 #include "views/focus/view_storage.h" | 17 #include "views/focus/view_storage.h" |
| 18 #include "views/widget/widget.h" | 18 #include "views/widget/widget.h" |
| 19 | 19 |
| 20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 21 #include "base/win/scoped_gdi_object.h" | 21 #include "base/win/scoped_gdi_object.h" |
| 22 #elif defined(OS_LINUX) | 22 #elif defined(OS_LINUX) |
| 23 #include "app/scoped_handle_gtk.h" | 23 #include "ui/base/gtk/scoped_handle_gtk.h" |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 29 typedef base::win::ScopedRegion ScopedPlatformRegion; | 29 typedef base::win::ScopedRegion ScopedPlatformRegion; |
| 30 #elif defined(OS_LINUX) | 30 #elif defined(OS_LINUX) |
| 31 typedef ScopedRegion ScopedPlatformRegion; | 31 typedef ui::ScopedRegion ScopedPlatformRegion; |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 using gfx::Path; | 36 using gfx::Path; |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 bool DropdownBarHost::disable_animations_during_testing_ = false; | 39 bool DropdownBarHost::disable_animations_during_testing_ = false; |
| 40 | 40 |
| 41 //////////////////////////////////////////////////////////////////////////////// | 41 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 focus_manager_->RegisterAccelerator(escape, this); | 310 focus_manager_->RegisterAccelerator(escape, this); |
| 311 esc_accel_target_registered_ = true; | 311 esc_accel_target_registered_ = true; |
| 312 } | 312 } |
| 313 | 313 |
| 314 void DropdownBarHost::UnregisterAccelerators() { | 314 void DropdownBarHost::UnregisterAccelerators() { |
| 315 DCHECK(esc_accel_target_registered_); | 315 DCHECK(esc_accel_target_registered_); |
| 316 views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false); | 316 views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false); |
| 317 focus_manager_->UnregisterAccelerator(escape, this); | 317 focus_manager_->UnregisterAccelerator(escape, this); |
| 318 esc_accel_target_registered_ = false; | 318 esc_accel_target_registered_ = false; |
| 319 } | 319 } |
| OLD | NEW |