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

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

Issue 138943006: Remove a bunch of dead files after the win aura switch. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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
« 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/dropdown_bar_host.h"
6
7 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
8 #include "chrome/browser/ui/views/frame/browser_view.h"
9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_view.h"
12 #include "ui/events/event.h"
13 #include "ui/events/keycodes/keyboard_code_conversion_win.h"
14 #include "ui/views/controls/scrollbar/native_scroll_bar.h"
15
16 using content::NativeWebKeyboardEvent;
17 using content::WebContents;
18
19 NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
20 const WebContents* contents,
21 const ui::KeyEvent& key_event) {
22 HWND hwnd = contents->GetView()->GetContentNativeView();
23 WORD key = WindowsKeyCodeForKeyboardCode(key_event.key_code());
24
25 MSG msg = { hwnd, key_event.native_event().message, key, 0 };
26 return NativeWebKeyboardEvent(msg);
27 }
28
29 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
30 bool no_redraw) {
31 DWORD swp_flags = SWP_NOOWNERZORDER;
32 if (no_redraw)
33 swp_flags |= SWP_NOREDRAW;
34 if (!host_->IsVisible())
35 swp_flags |= SWP_SHOWWINDOW;
36
37 ::SetWindowPos(host_->GetNativeView(), HWND_TOP, new_pos.x(), new_pos.y(),
38 new_pos.width(), new_pos.height(), swp_flags);
39 }
40
41 void DropdownBarHost::SetHostViewNative(views::View* host_view) {
42 // TODO(pkotwicz): Implement controlling the z-order of hwnds associated to a
43 // host view via the z-order of the host views in |browser_view_|'s view tree.
44 }
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