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

Side by Side Diff: chrome/browser/ui/panels/panel_mouse_watcher_win.cc

Issue 7633034: Use Titlebar instead of TitleBar consistently in panels code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review feedback. Created 9 years, 4 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) 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 "chrome/browser/ui/panels/panel_mouse_watcher_win.h" 5 #include "chrome/browser/ui/panels/panel_mouse_watcher_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "chrome/browser/ui/panels/panel.h" 9 #include "chrome/browser/ui/panels/panel.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "chrome/browser/ui/panels/panel_manager.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (hook_struct) 63 if (hook_struct)
64 mouse_watcher->OnMouseAction(hook_struct->pt.x, hook_struct->pt.y); 64 mouse_watcher->OnMouseAction(hook_struct->pt.x, hook_struct->pt.y);
65 } 65 }
66 return ::CallNextHookEx(NULL, code, wparam, lparam); 66 return ::CallNextHookEx(NULL, code, wparam, lparam);
67 } 67 }
68 68
69 void PanelMouseWatcherWin::OnMouseAction(int mouse_x, int mouse_y) { 69 void PanelMouseWatcherWin::OnMouseAction(int mouse_x, int mouse_y) {
70 PanelManager* panel_manager = PanelManager::GetInstance(); 70 PanelManager* panel_manager = PanelManager::GetInstance();
71 71
72 bool bring_up_titlebar = 72 bool bring_up_titlebar =
73 panel_manager->ShouldBringUpTitleBarForAllMinimizedPanels( 73 panel_manager->ShouldBringUpTitlebarForAllMinimizedPanels(
74 mouse_x, mouse_y); 74 mouse_x, mouse_y);
75 if (bring_up_titlebar == bring_up_titlebar_) 75 if (bring_up_titlebar == bring_up_titlebar_)
76 return; 76 return;
77 bring_up_titlebar_ = bring_up_titlebar; 77 bring_up_titlebar_ = bring_up_titlebar;
78 78
79 panel_manager->BringUpOrDownTitleBarForAllMinimizedPanels(bring_up_titlebar); 79 panel_manager->BringUpOrDownTitlebarForAllMinimizedPanels(bring_up_titlebar);
80 } 80 }
81 81
82 } 82 }
83 83
84 void EnsureMouseWatcherStarted() { 84 void EnsureMouseWatcherStarted() {
85 if (!mouse_watcher.get()) 85 if (!mouse_watcher.get())
86 mouse_watcher.reset(new PanelMouseWatcherWin()); 86 mouse_watcher.reset(new PanelMouseWatcherWin());
87 } 87 }
88 88
89 void StopMouseWatcher() { 89 void StopMouseWatcher() {
90 mouse_watcher.reset(NULL); 90 mouse_watcher.reset(NULL);
91 } 91 }
92 92
93 bool IsMouseWatcherStarted() { 93 bool IsMouseWatcherStarted() {
94 return mouse_watcher.get() != NULL; 94 return mouse_watcher.get() != NULL;
95 } 95 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.cc ('k') | chrome/browser/ui/panels/panel_titlebar_view_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698