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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_view.h

Issue 9616037: Change panel drag related methods to use mouse location in screen coordinates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to reland Created 8 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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 20 matching lines...) Expand all
31 virtual ~PanelBrowserView(); 31 virtual ~PanelBrowserView();
32 32
33 Panel* panel() const { return panel_.get(); } 33 Panel* panel() const { return panel_.get(); }
34 bool closed() const { return closed_; } 34 bool closed() const { return closed_; }
35 bool focused() const { return focused_; } 35 bool focused() const { return focused_; }
36 36
37 PanelBrowserFrameView* GetFrameView() const; 37 PanelBrowserFrameView* GetFrameView() const;
38 38
39 // Called from frame view when titlebar receives a mouse event. 39 // Called from frame view when titlebar receives a mouse event.
40 // Return true if the event is handled. 40 // Return true if the event is handled.
41 bool OnTitlebarMousePressed(const gfx::Point& location); 41 // |mouse_location| is in screen coordinates.
42 bool OnTitlebarMouseDragged(const gfx::Point& location); 42 bool OnTitlebarMousePressed(const gfx::Point& mouse_location);
43 bool OnTitlebarMouseDragged(const gfx::Point& mouse_location);
43 bool OnTitlebarMouseReleased(); 44 bool OnTitlebarMouseReleased();
44 bool OnTitlebarMouseCaptureLost(); 45 bool OnTitlebarMouseCaptureLost();
45 46
46 private: 47 private:
47 friend class NativePanelTestingWin; 48 friend class NativePanelTestingWin;
48 friend class PanelBrowserViewTest; 49 friend class PanelBrowserViewTest;
49 50
50 enum MouseDraggingState { 51 enum MouseDraggingState {
51 NO_DRAGGING, 52 NO_DRAGGING,
52 DRAGGING_STARTED, 53 DRAGGING_STARTED,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // The last view that had focus in the panel. This is saved so that focus can 170 // The last view that had focus in the panel. This is saved so that focus can
170 // be restored properly when a drag ends. 171 // be restored properly when a drag ends.
171 views::View* old_focused_view_; 172 views::View* old_focused_view_;
172 173
173 content::NotificationRegistrar registrar_; 174 content::NotificationRegistrar registrar_;
174 175
175 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); 176 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
176 }; 177 };
177 178
178 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 179 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.cc ('k') | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698