summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/download_item_gtk.h
blob: f9b15e836acce695525f3f3601d87d0b460851ef (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
// 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_GTK_DOWNLOAD_ITEM_GTK_H_
#define CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_

#include <gtk/gtk.h>

#include "base/scoped_ptr.h"

class BaseDownloadItemModel;
class NineBox;

class DownloadItemGtk {
 public:
  // DownloadItemGtk takes ownership of |download_item_model|;
  DownloadItemGtk(BaseDownloadItemModel* download_item_model,
                  GtkWidget* parent_shelf);

 private:
  static void InitNineBoxes();

  static gboolean OnBodyExpose(GtkWidget* widget, GdkEventExpose* e,
                               DownloadItemGtk* download_item);

  static NineBox* nine_box_normal_;
  static NineBox* nine_box_prelight_;
  static NineBox* nine_box_active_;

  // The widget that contains the body and menu dropdown.
  GtkWidget* hbox_;

  // The widget that contains the name of the download and the progress
  // animation.
  GtkWidget* body_;

  // The download item model we represent.
  scoped_ptr<BaseDownloadItemModel> download_model_;

  // The shelf we show ourselves on. We do not own this widget.
  GtkWidget* parent_shelf_;
};

#endif  // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_