Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: chrome/browser/ui/views/dropdown_bar_host.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.h ('k') | chrome/browser/ui/views/find_bar_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_host_delegate.h" 10 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 ScopedPlatformRegion exclude_region(exclude_path.CreateNativeRegion()); 328 ScopedPlatformRegion exclude_region(exclude_path.CreateNativeRegion());
329 region.Set(Path::SubtractRegion(region.Get(), exclude_region.Get())); 329 region.Set(Path::SubtractRegion(region.Get(), exclude_region.Get()));
330 } 330 }
331 331
332 // Window takes ownership of the region. 332 // Window takes ownership of the region.
333 host()->SetShape(region.release()); 333 host()->SetShape(region.release());
334 } 334 }
335 335
336 void DropdownBarHost::RegisterAccelerators() { 336 void DropdownBarHost::RegisterAccelerators() {
337 DCHECK(!esc_accel_target_registered_); 337 DCHECK(!esc_accel_target_registered_);
338 views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false); 338 ui::Accelerator escape(ui::VKEY_ESCAPE, false, false, false);
339 focus_manager_->RegisterAccelerator(escape, this); 339 focus_manager_->RegisterAccelerator(escape, this);
340 esc_accel_target_registered_ = true; 340 esc_accel_target_registered_ = true;
341 } 341 }
342 342
343 void DropdownBarHost::UnregisterAccelerators() { 343 void DropdownBarHost::UnregisterAccelerators() {
344 DCHECK(esc_accel_target_registered_); 344 DCHECK(esc_accel_target_registered_);
345 views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false); 345 ui::Accelerator escape(ui::VKEY_ESCAPE, false, false, false);
346 focus_manager_->UnregisterAccelerator(escape, this); 346 focus_manager_->UnregisterAccelerator(escape, this);
347 esc_accel_target_registered_ = false; 347 esc_accel_target_registered_ = false;
348 } 348 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.h ('k') | chrome/browser/ui/views/find_bar_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698