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

Side by Side Diff: ui/views/controls/menu/menu_host.cc

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 "ui/views/controls/menu/menu_host.h" 5 #include "ui/views/controls/menu/menu_host.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "ui/events/gestures/gesture_recognizer.h" 9 #include "ui/events/gestures/gesture_recognizer.h"
10 #include "ui/gfx/path.h" 10 #include "ui/gfx/path.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 submenu_->GetScrollViewContainer()->HasBubbleBorder(); 48 submenu_->GetScrollViewContainer()->HasBubbleBorder();
49 params.has_dropshadow = !bubble_border; 49 params.has_dropshadow = !bubble_border;
50 params.opacity = (bubble_border || rounded_border) ? 50 params.opacity = (bubble_border || rounded_border) ?
51 Widget::InitParams::TRANSLUCENT_WINDOW : 51 Widget::InitParams::TRANSLUCENT_WINDOW :
52 Widget::InitParams::OPAQUE_WINDOW; 52 Widget::InitParams::OPAQUE_WINDOW;
53 params.parent = parent ? parent->GetNativeView() : NULL; 53 params.parent = parent ? parent->GetNativeView() : NULL;
54 params.bounds = bounds; 54 params.bounds = bounds;
55 Init(params); 55 Init(params);
56 56
57 if (bubble_border) 57 if (bubble_border)
58 SetShadowType(GetNativeView(), views::corewm::SHADOW_TYPE_NONE); 58 SetShadowType(GetNativeView(), wm::SHADOW_TYPE_NONE);
59 59
60 SetContentsView(contents_view); 60 SetContentsView(contents_view);
61 if (bubble_border || rounded_border) 61 if (bubble_border || rounded_border)
62 SetOpacity(0); 62 SetOpacity(0);
63 ShowMenuHost(do_capture); 63 ShowMenuHost(do_capture);
64 } 64 }
65 65
66 bool MenuHost::IsMenuHostVisible() { 66 bool MenuHost::IsMenuHostVisible() {
67 return IsVisible(); 67 return IsVisible();
68 } 68 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if (destroying_) 134 if (destroying_)
135 return; 135 return;
136 136
137 MenuController* menu_controller = 137 MenuController* menu_controller =
138 submenu_->GetMenuItem()->GetMenuController(); 138 submenu_->GetMenuItem()->GetMenuController();
139 if (menu_controller && !menu_controller->drag_in_progress()) 139 if (menu_controller && !menu_controller->drag_in_progress())
140 menu_controller->CancelAll(); 140 menu_controller->CancelAll();
141 } 141 }
142 142
143 } // namespace views 143 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_window_targeter.h ('k') | ui/views/corewm/capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698