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

Side by Side Diff: chrome/browser/ui/panels/native_panel.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_NATIVE_PANEL_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
6 #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 6 #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/panels/panel.h" 9 #include "chrome/browser/ui/panels/panel.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 virtual void SetPanelAppIconVisibility(bool visible) = 0; 89 virtual void SetPanelAppIconVisibility(bool visible) = 0;
90 }; 90 };
91 91
92 // A NativePanel utility interface used for accessing elements of the 92 // A NativePanel utility interface used for accessing elements of the
93 // native panel used only by test automation. 93 // native panel used only by test automation.
94 class NativePanelTesting { 94 class NativePanelTesting {
95 public: 95 public:
96 static NativePanelTesting* Create(NativePanel* native_panel); 96 static NativePanelTesting* Create(NativePanel* native_panel);
97 virtual ~NativePanelTesting() {} 97 virtual ~NativePanelTesting() {}
98 98
99 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; 99 // |mouse_location| is in screen coordinates.
100 virtual void PressLeftMouseButtonTitlebar(
101 const gfx::Point& mouse_location) = 0;
100 virtual void ReleaseMouseButtonTitlebar() = 0; 102 virtual void ReleaseMouseButtonTitlebar() = 0;
101 virtual void DragTitlebar(int delta_x, int delta_y) = 0; 103 virtual void DragTitlebar(const gfx::Point& mouse_location) = 0;
102 virtual void CancelDragTitlebar() = 0; 104 virtual void CancelDragTitlebar() = 0;
103 virtual void FinishDragTitlebar() = 0; 105 virtual void FinishDragTitlebar() = 0;
104 106
105 // Verifies, on a deepest possible level, if the Panel is showing the "Draw 107 // Verifies, on a deepest possible level, if the Panel is showing the "Draw
106 // Attention" effects to the user. May include checking colors etc. 108 // Attention" effects to the user. May include checking colors etc.
107 virtual bool VerifyDrawingAttention() const = 0; 109 virtual bool VerifyDrawingAttention() const = 0;
108 // Verifies, on a deepest possible level, if the native panel is really 110 // Verifies, on a deepest possible level, if the native panel is really
109 // active, i.e. the titlebar is painted per its active state. 111 // active, i.e. the titlebar is painted per its active state.
110 virtual bool VerifyActiveState(bool is_active) = 0; 112 virtual bool VerifyActiveState(bool is_active) = 0;
111 virtual void WaitForWindowCreationToComplete() const { } 113 virtual void WaitForWindowCreationToComplete() const { }
112 114
113 virtual bool IsWindowSizeKnown() const = 0; 115 virtual bool IsWindowSizeKnown() const = 0;
114 virtual bool IsAnimatingBounds() const = 0; 116 virtual bool IsAnimatingBounds() const = 0;
115 }; 117 };
116 118
117 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 119 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/detached_panel_browsertest.cc ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698