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

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

Issue 10987037: Add tests for panel app icon functionaility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 2 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
« no previous file with comments | « chrome/browser/ui/gtk/panels/panel_gtk.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7
8 #include "chrome/browser/ui/panels/panel.h" 8 #include "chrome/browser/ui/panels/panel.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
11 class NativePanelTesting; 11 class NativePanelTesting;
12 12
13 namespace content { 13 namespace content {
14 struct NativeWebKeyboardEvent; 14 struct NativeWebKeyboardEvent;
15 class WebContents; 15 class WebContents;
16 } 16 }
17 17
18 namespace gfx { 18 namespace gfx {
19 class Rect; 19 class Rect;
20 } // namespace gfx 20 } // namespace gfx
21 21
22 // An interface for a class that implements platform-specific behavior for panel 22 // An interface for a class that implements platform-specific behavior for panel
23 // windows to provide additional methods not found in BaseWindow. 23 // windows to provide additional methods not found in BaseWindow.
24 class NativePanel { 24 class NativePanel {
25 friend class BasePanelBrowserTest; // for CreateNativePanelTesting 25 friend class BasePanelBrowserTest; // for CreateNativePanelTesting
26 friend class Panel; 26 friend class Panel;
27 friend class PanelBrowserWindow; 27 friend class PanelBrowserWindow;
28 friend class PanelBrowserTest; 28 friend class PanelBrowserTest;
29 friend class PanelExtensionBrowserTest;
29 30
30 protected: 31 protected:
31 virtual ~NativePanel() {} 32 virtual ~NativePanel() {}
32 33
33 virtual void ShowPanel() = 0; 34 virtual void ShowPanel() = 0;
34 virtual void ShowPanelInactive() = 0; 35 virtual void ShowPanelInactive() = 0;
35 virtual gfx::Rect GetPanelBounds() const = 0; 36 virtual gfx::Rect GetPanelBounds() const = 0;
36 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; 37 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0;
37 virtual void SetPanelBoundsInstantly(const gfx::Rect& bounds) = 0; 38 virtual void SetPanelBoundsInstantly(const gfx::Rect& bounds) = 0;
38 virtual void ClosePanel() = 0; 39 virtual void ClosePanel() = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 virtual void DragTitlebar(const gfx::Point& mouse_location) = 0; 104 virtual void DragTitlebar(const gfx::Point& mouse_location) = 0;
104 virtual void CancelDragTitlebar() = 0; 105 virtual void CancelDragTitlebar() = 0;
105 virtual void FinishDragTitlebar() = 0; 106 virtual void FinishDragTitlebar() = 0;
106 107
107 // Verifies, on a deepest possible level, if the Panel is showing the "Draw 108 // Verifies, on a deepest possible level, if the Panel is showing the "Draw
108 // Attention" effects to the user. May include checking colors etc. 109 // Attention" effects to the user. May include checking colors etc.
109 virtual bool VerifyDrawingAttention() const = 0; 110 virtual bool VerifyDrawingAttention() const = 0;
110 // Verifies, on a deepest possible level, if the native panel is really 111 // Verifies, on a deepest possible level, if the native panel is really
111 // active, i.e. the titlebar is painted per its active state. 112 // active, i.e. the titlebar is painted per its active state.
112 virtual bool VerifyActiveState(bool is_active) = 0; 113 virtual bool VerifyActiveState(bool is_active) = 0;
114 // Verifies, on a deepest possible level, if the native panel is really
115 // showing a correct app icon (taskbar icon).
116 virtual bool VerifyAppIcon() const = 0;
113 virtual void WaitForWindowCreationToComplete() const { } 117 virtual void WaitForWindowCreationToComplete() const { }
114 118
115 virtual bool IsWindowSizeKnown() const = 0; 119 virtual bool IsWindowSizeKnown() const = 0;
116 virtual bool IsAnimatingBounds() const = 0; 120 virtual bool IsAnimatingBounds() const = 0;
117 virtual bool IsButtonVisible(panel::TitlebarButtonType button_type) const = 0; 121 virtual bool IsButtonVisible(panel::TitlebarButtonType button_type) const = 0;
118 }; 122 };
119 123
120 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 124 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/panels/panel_gtk.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698