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

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

Issue 7646003: Support auto-hide taskbar for panels on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_
6 #define CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_
7 #pragma once
8
9 #include "base/task.h"
10 #include "base/values.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h"
13 #include "chrome/common/extensions/extension.h"
14 #include "chrome/test/base/in_process_browser_test.h"
15 #include "ui/gfx/rect.h"
16
17 class Panel;
18
19 class BasePanelBrowserTest : public InProcessBrowserTest {
20 public:
21 class MockAutoHidingDesktopBar : public AutoHidingDesktopBar {
22 public:
23 virtual ~MockAutoHidingDesktopBar() { }
24
25 virtual void EnableAutoHiding(Alignment alignment,
26 bool enabled,
27 int thickness) = 0;
28 virtual void SetVisibility(Alignment alignment, Visibility visibility) = 0;
29 virtual void SetThickness(Alignment alignment, int thickness) = 0;
30 };
31
32 BasePanelBrowserTest();
33 virtual ~BasePanelBrowserTest();
34
35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
36 virtual void SetUpOnMainThread() OVERRIDE;
37
38 protected:
39 enum ShowFlag { SHOW_AS_ACTIVE, SHOW_AS_INACTIVE };
40
41 struct CreatePanelParams {
42 std::string name;
43 gfx::Rect bounds;
44 ShowFlag show_flag;
45
46 CreatePanelParams(const std::string& name,
47 const gfx::Rect& bounds,
48 ShowFlag show_flag)
49 : name(name),
50 bounds(bounds),
51 show_flag(show_flag) {
52 }
53 };
54
55 Panel* CreatePanelWithParams(const CreatePanelParams& params);
56 Panel* CreatePanelWithBounds(const std::string& panel_name,
57 const gfx::Rect& bounds);
58 Panel* CreatePanel(const std::string& panel_name);
59
60 scoped_refptr<Extension> CreateExtension(const FilePath::StringType& path,
61 Extension::Location location,
62 const DictionaryValue& extra_value);
63
64 gfx::Rect testing_work_area() const { return testing_work_area_; }
65
66 MockAutoHidingDesktopBar* mock_auto_hiding_desktop_bar() const {
67 return mock_auto_hiding_desktop_bar_.get();
68 }
69
70 private:
71
72 gfx::Rect testing_work_area_;
73 scoped_refptr<MockAutoHidingDesktopBar> mock_auto_hiding_desktop_bar_;
74 };
75
76 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/auto_hiding_desktop_bar_win_unittest.cc ('k') | chrome/browser/ui/panels/base_panel_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698