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

Side by Side Diff: chrome/browser/chromeos/frame/bubble_frame_view.h

Issue 8774022: Converting BubbleWindow uses, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Doesn't build... just a checkpoint for this work, might change approach. Created 9 years 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
(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_CHROMEOS_FRAME_BUBBLE_FRAME_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_FRAME_VIEW_H_
7 #pragma once
8
9 #include "chrome/browser/chromeos/frame/bubble_window.h"
10 #include "ui/views/controls/button/button.h"
11 #include "ui/views/window/non_client_view.h"
12
13 namespace gfx {
14 class Insets;
15 class Path;
16 class Point;
17 class Rect;
18 class Size;
19 }
20
21 namespace views {
22 class ImageButton;
23 class Label;
24 class Throbber;
25 class Widget;
26 }
27
28 namespace chromeos {
29
30 // BubbleFrameView implements a BubbleBorder based window frame.
31 class BubbleFrameView : public views::NonClientFrameView,
32 public views::ButtonListener {
33 public:
34 BubbleFrameView(views::Widget* frame,
35 views::WidgetDelegate* widget_delegate,
36 DialogStyle style);
37 virtual ~BubbleFrameView();
38
39 // Overridden from views::NonClientFrameView:
40 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
41 virtual gfx::Rect GetWindowBoundsForClientBounds(
42 const gfx::Rect& client_bounds) const OVERRIDE;
43 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
44 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask)
45 OVERRIDE;
46 virtual void ResetWindowControls() OVERRIDE;
47 virtual void UpdateWindowIcon() OVERRIDE;
48
49 // View overrides:
50 virtual gfx::Insets GetInsets() const OVERRIDE;
51 virtual gfx::Size GetPreferredSize() OVERRIDE;
52 virtual void Layout() OVERRIDE;
53 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
54
55 // Overridden from views::ButtonListener:
56 virtual void ButtonPressed(views::Button* sender, const views::Event& event)
57 OVERRIDE;
58
59 void StartThrobber();
60 void StopThrobber();
61
62 private:
63 // The window that owns this view.
64 views::Widget* frame_;
65
66 // Allows to tweak appearance of the view.
67 DialogStyle style_;
68
69 // Title label
70 views::Label* title_;
71
72 // The bounds of the client view, in this view's coordinates.
73 gfx::Rect client_view_bounds_;
74
75 // Close button for STYLE_XBAR case.
76 views::ImageButton* close_button_;
77
78 // Throbber is optional. Employed by STYLE_THROBBER.
79 views::Throbber* throbber_;
80
81 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
82 };
83
84 } // namespace chromeos
85
86 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BUBBLE_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/choose_mobile_network_dialog.cc ('k') | chrome/browser/chromeos/frame/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698