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

Unified Diff: chrome/browser/ui/gtk/action_box_button_gtk.cc

Issue 10830140: GTK implementation of the action box button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forward delare Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/action_box_button_gtk.h ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/action_box_button_gtk.cc
diff --git a/chrome/browser/ui/gtk/action_box_button_gtk.cc b/chrome/browser/ui/gtk/action_box_button_gtk.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d7e68697473fae2ec3128c72ec07939d146716d8
--- /dev/null
+++ b/chrome/browser/ui/gtk/action_box_button_gtk.cc
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 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.
+
+#include "chrome/browser/ui/gtk/action_box_button_gtk.h"
+
+#include <gtk/gtk.h>
+
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/gtk/custom_button.h"
+#include "chrome/browser/ui/gtk/view_id_util.h"
+#include "chrome/browser/ui/view_ids.h"
+#include "grit/generated_resources.h"
+#include "grit/theme_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+
+ActionBoxButtonGtk::ActionBoxButtonGtk(Browser* browser) : browser_(browser) {
+ button_.reset(new CustomDrawButton(
+ IDR_ACTION_BOX_BUTTON,
+ IDR_ACTION_BOX_BUTTON_PRESSED,
+ IDR_ACTION_BOX_BUTTON_PRESSED, // TODO: hover
+ 0)); // TODO: disabled?
+ gtk_widget_set_tooltip_text(widget(),
+ l10n_util::GetStringUTF8(IDS_TOOLTIP_ACTION_BOX_BUTTON).c_str());
+
+ g_signal_connect(widget(), "clicked",
+ G_CALLBACK(OnClickThunk), this);
+
+ ViewIDUtil::SetID(widget(), VIEW_ID_ACTION_BOX_BUTTON);
+}
+
+ActionBoxButtonGtk::~ActionBoxButtonGtk() {
+}
+
+GtkWidget* ActionBoxButtonGtk::widget() {
+ return button_->widget();
+}
+
+void ActionBoxButtonGtk::OnClick(GtkWidget* widget) {
+ // TODO(mpcomplete): show the menu. See back_forward_button_gtk for menu
+ // stuff.
+}
« no previous file with comments | « chrome/browser/ui/gtk/action_box_button_gtk.h ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698