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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/gtk/action_box_button_gtk.h"
6
7 #include <gtk/gtk.h>
8
9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/gtk/custom_button.h"
11 #include "chrome/browser/ui/gtk/view_id_util.h"
12 #include "chrome/browser/ui/view_ids.h"
13 #include "grit/generated_resources.h"
14 #include "grit/theme_resources.h"
15 #include "ui/base/l10n/l10n_util.h"
16
17 ActionBoxButtonGtk::ActionBoxButtonGtk(Browser* browser) : browser_(browser) {
18 button_.reset(new CustomDrawButton(
19 IDR_ACTION_BOX_BUTTON,
20 IDR_ACTION_BOX_BUTTON_PRESSED,
21 IDR_ACTION_BOX_BUTTON_PRESSED, // TODO: hover
22 0)); // TODO: disabled?
23 gtk_widget_set_tooltip_text(widget(),
24 l10n_util::GetStringUTF8(IDS_TOOLTIP_ACTION_BOX_BUTTON).c_str());
25
26 g_signal_connect(widget(), "clicked",
27 G_CALLBACK(OnClickThunk), this);
28
29 ViewIDUtil::SetID(widget(), VIEW_ID_ACTION_BOX_BUTTON);
30 }
31
32 ActionBoxButtonGtk::~ActionBoxButtonGtk() {
33 }
34
35 GtkWidget* ActionBoxButtonGtk::widget() {
36 return button_->widget();
37 }
38
39 void ActionBoxButtonGtk::OnClick(GtkWidget* widget) {
40 // TODO(mpcomplete): show the menu. See back_forward_button_gtk for menu
41 // stuff.
42 }
OLDNEW
« 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