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

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

Issue 10825254: Remove views::KeyEvent, replacing uses of it with ui::KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
10 11
11 using content::NativeWebKeyboardEvent; 12 using content::NativeWebKeyboardEvent;
12 using content::WebContents; 13 using content::WebContents;
13 14
14 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent( 15 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
15 const WebContents* contents, 16 const WebContents* contents,
16 const views::KeyEvent& key_event) { 17 const ui::KeyEvent& key_event) {
17 return NativeWebKeyboardEvent(key_event.native_event()); 18 ui::Event* ui_event =
19 static_cast<ui::Event*>(const_cast<ui::KeyEvent*>(&key_event));
20 return NativeWebKeyboardEvent(ui_event);
18 } 21 }
19 22
20 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos, 23 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
21 bool no_redraw) { 24 bool no_redraw) {
22 if (!host_->IsVisible()) 25 if (!host_->IsVisible())
23 host_->GetNativeView()->Show(); 26 host_->GetNativeView()->Show();
24 host_->GetNativeView()->SetBounds(new_pos); 27 host_->GetNativeView()->SetBounds(new_pos);
25 host_->StackAtTop(); 28 host_->StackAtTop();
26 } 29 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.h ('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