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

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 9839034: views: Refactor the way we get the combo box font. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: share it Created 8 years, 9 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
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 9c0eaea62ff6657cc02f14f9a0c1d135859827c3..a5f70a32e3d3aa5a4d0eeba73ebbc37c0a02b3b9 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -9,6 +9,7 @@
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/models/combobox_model.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/widget/widget.h"
@@ -21,6 +22,12 @@ const char Combobox::kViewClassName[] = "views/Combobox";
////////////////////////////////////////////////////////////////////////////////
// Combobox, public:
+// static
+const gfx::Font& Combobox::GetFont() {
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ return rb.GetFont(ui::ResourceBundle::BaseFont);
+}
+
Combobox::Combobox(ui::ComboboxModel* model)
: native_wrapper_(NULL),
model_(model),

Powered by Google App Engine
This is Rietveld 408576698