summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 00:11:40 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 00:11:40 +0000
commitb4d13c652373433d8f6b755bc68f670f187d2157 (patch)
treeb9a64ed14157f4fb6e03d040921bc9ba63f54091 /views/controls
parent90d890d27ead80ecbbe5e861ec71ff97b459c954 (diff)
downloadchromium_src-b4d13c652373433d8f6b755bc68f670f187d2157.zip
chromium_src-b4d13c652373433d8f6b755bc68f670f187d2157.tar.gz
chromium_src-b4d13c652373433d8f6b755bc68f670f187d2157.tar.bz2
Convert LOG(INFO) to VLOG(1) - views/.
This also removes DEBUG_MENU. I don't think the extra ints are a big deal. They should be optimized away in release mode. Also fixes a spelling error and converts some silly code to using early returns. BUG=none TEST=none Review URL: http://codereview.chromium.org/3908004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/menu/menu_controller.cc39
-rw-r--r--views/controls/menu/menu_host_root_view.cc6
-rw-r--r--views/controls/menu/menu_host_win.cc6
3 files changed, 0 insertions, 51 deletions
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc
index 06c86fc..affddeb 100644
--- a/views/controls/menu/menu_controller.cc
+++ b/views/controls/menu/menu_controller.cc
@@ -249,11 +249,6 @@ MenuController* MenuController::GetActiveInstance() {
return active_instance_;
}
-#ifdef DEBUG_MENU
-static int instance_count = 0;
-static int nested_depth = 0;
-#endif
-
MenuItemView* MenuController::Run(gfx::NativeWindow parent,
MenuButton* button,
MenuItemView* root,
@@ -298,11 +293,6 @@ MenuItemView* MenuController::Run(gfx::NativeWindow parent,
menu_button_ = button;
}
-#ifdef DEBUG_MENU
- nested_depth++;
- DLOG(INFO) << " entering nested loop, depth=" << nested_depth;
-#endif
-
// Make sure Chrome doesn't attempt to shut down while the menu is showing.
if (ViewsDelegate::views_delegate)
ViewsDelegate::views_delegate->AddRef();
@@ -320,11 +310,6 @@ MenuItemView* MenuController::Run(gfx::NativeWindow parent,
if (ViewsDelegate::views_delegate)
ViewsDelegate::views_delegate->ReleaseRef();
-#ifdef DEBUG_MENU
- nested_depth--;
- DLOG(INFO) << " exiting nested loop, depth=" << nested_depth;
-#endif
-
// Close any open menus.
SetSelection(NULL, false, true);
@@ -448,9 +433,6 @@ void MenuController::Cancel(ExitType type) {
void MenuController::OnMousePressed(SubmenuView* source,
const MouseEvent& event) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << "OnMousePressed source=" << source;
-#endif
if (!blocking_run_)
return;
@@ -497,9 +479,6 @@ void MenuController::OnMousePressed(SubmenuView* source,
void MenuController::OnMouseDragged(SubmenuView* source,
const MouseEvent& event) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << "OnMouseDragged source=" << source;
-#endif
MenuPart part = GetMenuPartByScreenCoordinate(source, event.x(), event.y());
UpdateScrolling(part);
@@ -557,9 +536,6 @@ void MenuController::OnMouseDragged(SubmenuView* source,
void MenuController::OnMouseReleased(SubmenuView* source,
const MouseEvent& event) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << "OnMouseReleased source=" << source;
-#endif
if (!blocking_run_)
return;
@@ -608,9 +584,6 @@ void MenuController::OnMouseReleased(SubmenuView* source,
void MenuController::OnMouseMoved(SubmenuView* source,
const MouseEvent& event) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << "OnMouseMoved source=" << source;
-#endif
if (showing_submenu_)
return;
@@ -974,20 +947,12 @@ MenuController::MenuController(bool blocking)
showing_submenu_(false),
menu_button_(NULL),
active_mouse_view_(NULL) {
-#ifdef DEBUG_MENU
- instance_count++;
- DLOG(INFO) << "created MC, count=" << instance_count;
-#endif
}
MenuController::~MenuController() {
DCHECK(!showing_);
StopShowTimer();
StopCancelAllTimer();
-#ifdef DEBUG_MENU
- instance_count--;
- DLOG(INFO) << "destroyed MC, count=" << instance_count;
-#endif
}
bool MenuController::SendAcceleratorToHotTrackedView() {
@@ -1674,10 +1639,6 @@ void MenuController::RepostEvent(SubmenuView* source,
View::ConvertPointToScreen(source->GetScrollViewContainer(), &screen_loc);
HWND window = WindowFromPoint(screen_loc.ToPOINT());
if (window) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << "RepostEvent on press";
-#endif
-
// Release the capture.
SubmenuView* submenu = state_.item->GetRootMenuItem()->GetSubmenu();
submenu->ReleaseCapture();
diff --git a/views/controls/menu/menu_host_root_view.cc b/views/controls/menu/menu_host_root_view.cc
index d472284..0b2a971 100644
--- a/views/controls/menu/menu_host_root_view.cc
+++ b/views/controls/menu/menu_host_root_view.cc
@@ -15,9 +15,6 @@ MenuHostRootView::MenuHostRootView(Widget* widget,
submenu_(submenu),
forward_drag_to_menu_controller_(true),
suspend_events_(false) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << " new MenuHostRootView " << this;
-#endif
}
bool MenuHostRootView::OnMousePressed(const MouseEvent& event) {
@@ -38,9 +35,6 @@ bool MenuHostRootView::OnMouseDragged(const MouseEvent& event) {
return true;
if (forward_drag_to_menu_controller_ && GetMenuController()) {
-#ifdef DEBUG_MENU
- DLOG(INFO) << " MenuHostRootView::OnMouseDragged source=" << submenu_;
-#endif
GetMenuController()->OnMouseDragged(submenu_, event);
return true;
}
diff --git a/views/controls/menu/menu_host_win.cc b/views/controls/menu/menu_host_win.cc
index 1bcc295..c22dcb9 100644
--- a/views/controls/menu/menu_host_win.cc
+++ b/views/controls/menu/menu_host_win.cc
@@ -100,9 +100,6 @@ void MenuHostWin::OnDestroy() {
void MenuHostWin::OnCaptureChanged(HWND hwnd) {
WidgetWin::OnCaptureChanged(hwnd);
owns_capture_ = false;
-#ifdef DEBUG_MENU
- DLOG(INFO) << "Capture changed";
-#endif
}
void MenuHostWin::OnCancelMode() {
@@ -122,9 +119,6 @@ void MenuHostWin::DoCapture() {
owns_capture_ = true;
SetCapture();
has_capture_ = true;
-#ifdef DEBUG_MENU
- DLOG(INFO) << "Doing capture";
-#endif
}
} // namespace views