summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/new_browser_window_widget.h
blob: 55400092bfe2f025de5adfdb2c136a179a349553 (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
// Copyright (c) 2009 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_NEW_BROWSER_WINDOW_WIDGET_H_
#define CHROME_BROWSER_VIEWS_NEW_BROWSER_WINDOW_WIDGET_H_

#include "views/controls/button/button.h"

class Profile;

namespace views {
class Widget;
}

// NewBrowserWindowWidget creates a window containing a single button that
// when clicked creates a new Browser. NewBrowserWindowWidget shows the window
// from its constructor, and closes it from the destructor.
class NewBrowserWindowWidget : public views::ButtonListener {
 public:
  explicit NewBrowserWindowWidget(Profile* profile);
  ~NewBrowserWindowWidget();

  // ButtonListener implementation.
  virtual void ButtonPressed(views::Button* sender, const views::Event& event);

 private:
  // The profile the browser is created with.
  Profile* profile_;

  // The widget containing the button.
  views::Widget* widget_;

  DISALLOW_COPY_AND_ASSIGN(NewBrowserWindowWidget);
};

#endif  // CHROME_BROWSER_VIEWS_NEW_BROWSER_WINDOW_WIDGET_H_