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

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

Issue 10483010: Change the visual appearance of panel on GTK per new UI design. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 6 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual void EnableResizeByMouse(bool enable) = 0; 94 virtual void EnableResizeByMouse(bool enable) = 0;
95 95
96 // Updates the visibility of the minimize and restore buttons. 96 // Updates the visibility of the minimize and restore buttons.
97 virtual void UpdatePanelMinimizeRestoreButtonVisibility() = 0; 97 virtual void UpdatePanelMinimizeRestoreButtonVisibility() = 0;
98 }; 98 };
99 99
100 // A NativePanel utility interface used for accessing elements of the 100 // A NativePanel utility interface used for accessing elements of the
101 // native panel used only by test automation. 101 // native panel used only by test automation.
102 class NativePanelTesting { 102 class NativePanelTesting {
103 public: 103 public:
104 enum TitlebarButtonType {
105 CLOSE_BUTTON,
106 MINIMIZE_BUTTON,
107 RESTORE_BUTTON
108 };
109
110 static NativePanelTesting* Create(NativePanel* native_panel); 104 static NativePanelTesting* Create(NativePanel* native_panel);
111 virtual ~NativePanelTesting() {} 105 virtual ~NativePanelTesting() {}
112 106
113 // Wrappers for the common cases when no modifier is needed. 107 // Wrappers for the common cases when no modifier is needed.
114 void PressLeftMouseButtonTitlebar(const gfx::Point& mouse_location) { 108 void PressLeftMouseButtonTitlebar(const gfx::Point& mouse_location) {
115 PressLeftMouseButtonTitlebar(mouse_location, panel::NO_MODIFIER); 109 PressLeftMouseButtonTitlebar(mouse_location, panel::NO_MODIFIER);
116 } 110 }
117 void ReleaseMouseButtonTitlebar() { 111 void ReleaseMouseButtonTitlebar() {
118 ReleaseMouseButtonTitlebar(panel::NO_MODIFIER); 112 ReleaseMouseButtonTitlebar(panel::NO_MODIFIER);
119 } 113 }
120 114
121 // |mouse_location| is in screen coordinates. 115 // |mouse_location| is in screen coordinates.
122 virtual void PressLeftMouseButtonTitlebar( 116 virtual void PressLeftMouseButtonTitlebar(
123 const gfx::Point& mouse_location, panel::ClickModifier modifier) = 0; 117 const gfx::Point& mouse_location, panel::ClickModifier modifier) = 0;
124 virtual void ReleaseMouseButtonTitlebar(panel::ClickModifier modifier) = 0; 118 virtual void ReleaseMouseButtonTitlebar(panel::ClickModifier modifier) = 0;
125 virtual void DragTitlebar(const gfx::Point& mouse_location) = 0; 119 virtual void DragTitlebar(const gfx::Point& mouse_location) = 0;
126 virtual void CancelDragTitlebar() = 0; 120 virtual void CancelDragTitlebar() = 0;
127 virtual void FinishDragTitlebar() = 0; 121 virtual void FinishDragTitlebar() = 0;
128 122
129 // Verifies, on a deepest possible level, if the Panel is showing the "Draw 123 // Verifies, on a deepest possible level, if the Panel is showing the "Draw
130 // Attention" effects to the user. May include checking colors etc. 124 // Attention" effects to the user. May include checking colors etc.
131 virtual bool VerifyDrawingAttention() const = 0; 125 virtual bool VerifyDrawingAttention() const = 0;
132 // Verifies, on a deepest possible level, if the native panel is really 126 // Verifies, on a deepest possible level, if the native panel is really
133 // active, i.e. the titlebar is painted per its active state. 127 // active, i.e. the titlebar is painted per its active state.
134 virtual bool VerifyActiveState(bool is_active) = 0; 128 virtual bool VerifyActiveState(bool is_active) = 0;
135 virtual void WaitForWindowCreationToComplete() const { } 129 virtual void WaitForWindowCreationToComplete() const { }
136 130
137 virtual bool IsWindowSizeKnown() const = 0; 131 virtual bool IsWindowSizeKnown() const = 0;
138 virtual bool IsAnimatingBounds() const = 0; 132 virtual bool IsAnimatingBounds() const = 0;
139 virtual bool IsButtonVisible(TitlebarButtonType button_type) const = 0; 133 virtual bool IsButtonVisible(panel::TitlebarButtonType button_type) const = 0;
140 }; 134 };
141 135
142 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 136 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698