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

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

Issue 10383239: Move NativeWebKeyboardEvent to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 7 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/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
10 10
11 using content::NativeWebKeyboardEvent;
11 using content::WebContents; 12 using content::WebContents;
12 13
13 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent( 14 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
14 const WebContents* contents, 15 const WebContents* contents,
15 const views::KeyEvent& key_event) { 16 const views::KeyEvent& key_event) {
16 return NativeWebKeyboardEvent(key_event.native_event()); 17 return NativeWebKeyboardEvent(key_event.native_event());
17 } 18 }
18 19
19 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos, 20 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
20 bool no_redraw) { 21 bool no_redraw) {
21 if (!host_->IsVisible()) 22 if (!host_->IsVisible())
22 host_->GetNativeView()->Show(); 23 host_->GetNativeView()->Show();
23 host_->GetNativeView()->SetBounds(new_pos); 24 host_->GetNativeView()->SetBounds(new_pos);
24 host_->StackAtTop(); 25 host_->StackAtTop();
25 } 26 }
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