blob: 5706d6bba3884b612527951cce071aa5d167a379 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_FRAME_H_
#define CHROME_BROWSER_VIEWS_FRAME_BROWSER_FRAME_H_
#pragma once
#include "build/build_config.h"
#include "views/window/non_client_view.h"
class BaseTabStrip;
class BrowserView;
class Profile;
class ThemeProvider;
namespace gfx {
class Font;
class Rect;
} // namespace gfx
namespace views {
class Window;
#if defined(OS_WIN)
class WindowWin;
#endif
} // namespace views
// This is a virtual interface that allows system specific browser frames.
class BrowserFrame {
public:
virtual ~BrowserFrame() {}
// Creates the appropriate BrowserFrame for this platform. The returned
// object is owned by the caller.
static BrowserFrame* Create(BrowserView* browser_view, Profile* profile);
static const gfx::Font& GetTitleFont();
// Returns the Window associated with this frame. Guraranteed non-NULL after
// construction.
virtual views::Window* GetWindow() = 0;
// Determine the distance of the left edge of the minimize button from the
// left edge of the window. Used in our Non-Client View's Layout.
virtual int GetMinimizeButtonOffset() const = 0;
// Retrieves the bounds, in non-client view coordinates for the specified
// TabStrip.
virtual gfx::Rect GetBoundsForTabStrip(BaseTabStrip* tabstrip) const = 0;
// Tells the frame to update the throbber.
virtual void UpdateThrobber(bool running) = 0;
// Tells the frame to continue a drag detached tab operation.
virtual void ContinueDraggingDetachedTab() = 0;
// Returns the theme provider for this frame.
virtual ThemeProvider* GetThemeProviderForFrame() const = 0;
// Returns true if the window should use the native frame view. This is true
// if there are no themes applied on Vista, or if there are themes applied and
// this browser window is an app or popup.
virtual bool AlwaysUseNativeFrame() const = 0;
// Returns the NonClientFrameView of this frame.
virtual views::View* GetFrameView() const = 0;
// Notifies the frame that the tab strip display mode changed so it can update
// its frame treatment if necessary.
virtual void TabStripDisplayModeChanged() = 0;
};
#endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_FRAME_H_
|