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

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

Issue 10917075: events: Move some files into ui/base/events/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months 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 | Annotate | Revision Log
OLDNEW
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/dropdown_bar_host.h" 5 #include "chrome/browser/ui/views/dropdown_bar_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/base/event.h" 9 #include "ui/base/events/event.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
11 11
12 using content::NativeWebKeyboardEvent; 12 using content::NativeWebKeyboardEvent;
13 using content::WebContents; 13 using content::WebContents;
14 14
15 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent( 15 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
16 const WebContents* contents, 16 const WebContents* contents,
17 const ui::KeyEvent& key_event) { 17 const ui::KeyEvent& key_event) {
18 // NativeWebKeyboardEvent should take a const gfx::NativeEvent, which would 18 // NativeWebKeyboardEvent should take a const gfx::NativeEvent, which would
19 // prevent this casting. 19 // prevent this casting.
20 ui::Event* ui_event = 20 ui::Event* ui_event =
21 static_cast<ui::Event*>(const_cast<ui::KeyEvent*>(&key_event)); 21 static_cast<ui::Event*>(const_cast<ui::KeyEvent*>(&key_event));
22 return NativeWebKeyboardEvent(ui_event); 22 return NativeWebKeyboardEvent(ui_event);
23 } 23 }
24 24
25 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos, 25 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
26 bool no_redraw) { 26 bool no_redraw) {
27 if (!host_->IsVisible()) 27 if (!host_->IsVisible())
28 host_->GetNativeView()->Show(); 28 host_->GetNativeView()->Show();
29 host_->GetNativeView()->SetBounds(new_pos); 29 host_->GetNativeView()->SetBounds(new_pos);
30 host_->StackAtTop(); 30 host_->StackAtTop();
31 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | chrome/browser/ui/views/dropdown_bar_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698