toolkit/crashreporter/client/crashreporter_gtk_common.h
author Bobby Holley <bobbyholley@gmail.com>
Sun, 19 Jul 2015 19:23:55 -0700
changeset 280067 a37164c4c1bbec3a11efb47e5a4f92034c8843d5
parent 202573 f95219244e18505d92fbfb50ce2ef25e3f2bd6fc
child 489668 cbb8fdf1daf98a15f7d57f6b08d273bdf96aa1a0
child 694109 98e2b4ee9775a2a2b5cc1bb8a390bfe901814f38
permissions -rw-r--r--
Bug 1161831 - Tests. r=billm

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef CRASHREPORTER_GTK_COMMON_H__
#define CRASHREPORTER_GTK_COMMON_H__

#include <glib.h>
#include <gtk/gtk.h>

#include <string>
#include <vector>

const char kIniFile[] = "crashreporter.ini";

extern GtkWidget* gWindow;
extern GtkWidget* gSubmitReportCheck;
extern GtkWidget* gIncludeURLCheck;
extern GtkWidget* gThrobber;
extern GtkWidget* gProgressLabel;
extern GtkWidget* gCloseButton;
extern GtkWidget* gRestartButton;

extern std::vector<std::string> gRestartArgs;
extern GThread* gSendThreadID;

extern bool gInitialized;
extern bool gDidTrySend;
extern StringTable gFiles;
extern StringTable gQueryParameters;
extern std::string gHttpProxy;
extern std::string gAuth;
extern std::string gCACertificateFile;
extern std::string gSendURL;
extern std::string gURLParameter;

void LoadProxyinfo();
gpointer SendThread(gpointer args);
gboolean WindowDeleted(GtkWidget* window,
                       GdkEvent* event,
                       gpointer userData);
gboolean check_escape(GtkWidget* window, GdkEventKey* event, gpointer data);
void SubmitReportChecked(GtkButton* sender, gpointer userData);
void IncludeURLClicked(GtkButton* sender, gpointer userData);
void CloseClicked(GtkButton* button,
                  gpointer userData);
void RestartClicked(GtkButton* button,
                    gpointer userData);

#endif // CRASHREPORTER_GTK_COMMON_H__