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

Side by Side Diff: views/controls/menu/menu_host_win.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | « views/controls/menu/menu_host_win.h ('k') | views/controls/menu/native_menu_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 "views/controls/menu/menu_host_win.h" 5 #include "views/controls/menu/menu_host_win.h"
6 6
7 #include "views/controls/menu/native_menu_host_delegate.h" 7 #include "views/controls/menu/native_menu_host_delegate.h"
8 8
9 namespace views { 9 namespace views {
10 10
11 //////////////////////////////////////////////////////////////////////////////// 11 ////////////////////////////////////////////////////////////////////////////////
12 // MenuHostWin, public: 12 // MenuHostWin, public:
13 13
14 MenuHostWin::MenuHostWin(internal::NativeMenuHostDelegate* delegate) 14 MenuHostWin::MenuHostWin(internal::NativeMenuHostDelegate* delegate)
15 : delegate_(delegate) { 15 : delegate_(delegate) {
16 } 16 }
17 17
18 MenuHostWin::~MenuHostWin() { 18 MenuHostWin::~MenuHostWin() {
19 } 19 }
20 20
21 //////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////////
22 // MenuHostWin, NativeMenuHost implementation: 22 // MenuHostWin, NativeMenuHost implementation:
23 23
24 void MenuHostWin::InitMenuHost(gfx::NativeWindow parent,
25 const gfx::Rect& bounds) {
26 WidgetWin::Init(parent, bounds);
27 }
28
29 void MenuHostWin::StartCapturing() { 24 void MenuHostWin::StartCapturing() {
30 SetMouseCapture(); 25 SetMouseCapture();
31 } 26 }
32 27
33 NativeWidget* MenuHostWin::AsNativeWidget() { 28 NativeWidget* MenuHostWin::AsNativeWidget() {
34 return this; 29 return this;
35 } 30 }
36 31
37 //////////////////////////////////////////////////////////////////////////////// 32 ////////////////////////////////////////////////////////////////////////////////
38 // MenuHostWin, WidgetWin overrides: 33 // MenuHostWin, WidgetWin overrides:
(...skipping 21 matching lines...) Expand all
60 //////////////////////////////////////////////////////////////////////////////// 55 ////////////////////////////////////////////////////////////////////////////////
61 // NativeMenuHost, public: 56 // NativeMenuHost, public:
62 57
63 // static 58 // static
64 NativeMenuHost* NativeMenuHost::CreateNativeMenuHost( 59 NativeMenuHost* NativeMenuHost::CreateNativeMenuHost(
65 internal::NativeMenuHostDelegate* delegate) { 60 internal::NativeMenuHostDelegate* delegate) {
66 return new MenuHostWin(delegate); 61 return new MenuHostWin(delegate);
67 } 62 }
68 63
69 } // namespace views 64 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_host_win.h ('k') | views/controls/menu/native_menu_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698