summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h
blob: f1b908190cc3826a67926bcda7ab83a0c5ce09d9 (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
// 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_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
#define CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_

#include "base/basictypes.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"

typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;

class CreateApplicationShortcutsDialogGtk {
 public:
  // Displays the dialog box to create application shortcuts for |url| with
  // |title|.
  static void Show(GtkWindow* parent, const GURL& url, const string16& title);

 private:
  CreateApplicationShortcutsDialogGtk(GtkWindow* parent, const GURL& url,
                                      const string16& title);
  ~CreateApplicationShortcutsDialogGtk() { }

  // Handler to respond to Ok and Cancel responses from the dialog.
  static void HandleOnResponseDialog(GtkWidget* widget,
      int response, CreateApplicationShortcutsDialogGtk* user_data) {
    user_data->OnDialogResponse(widget, response);
  }

  void OnDialogResponse(GtkWidget* widget, int response);

  // UI elements.
  GtkWidget* desktop_checkbox_;
  GtkWidget* menu_checkbox_;

  // Target URL of the shortcut.
  GURL url_;

  // Visible title of the shortcut.
  string16 title_;

  DISALLOW_COPY_AND_ASSIGN(CreateApplicationShortcutsDialogGtk);
};

#endif  // CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_