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

Side by Side Diff: views/examples/combobox_example.cc

Issue 6264014: Fix compile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the other compile error too Created 9 years, 11 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
« no previous file with comments | « no previous file | views/examples/slider_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/examples/combobox_example.h" 5 #include "views/examples/combobox_example.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ui/base/models/combobox_model.h" 9 #include "ui/base/models/combobox_model.h"
10 #include "views/fill_layout.h"
11 10
12 namespace { 11 namespace {
13 12
14 // An sample combobox model that generates list of "Item <index>". 13 // An sample combobox model that generates list of "Item <index>".
15 class ComboboxModelExample : public ui::ComboboxModel { 14 class ComboboxModelExample : public ui::ComboboxModel {
16 public: 15 public:
17 ComboboxModelExample() {} 16 ComboboxModelExample() {}
18 virtual ~ComboboxModelExample() {} 17 virtual ~ComboboxModelExample() {}
19 18
20 // Overridden from ui::ComboboxModel: 19 // Overridden from ui::ComboboxModel:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 53
55 void ComboboxExample::ItemChanged(views::Combobox* combo_box, 54 void ComboboxExample::ItemChanged(views::Combobox* combo_box,
56 int prev_index, 55 int prev_index,
57 int new_index) { 56 int new_index) {
58 PrintStatus(L"Selected: index=%d, label=%ls", 57 PrintStatus(L"Selected: index=%d, label=%ls",
59 new_index, UTF16ToWideHack( 58 new_index, UTF16ToWideHack(
60 combo_box->model()->GetItemAt(new_index)).c_str()); 59 combo_box->model()->GetItemAt(new_index)).c_str());
61 } 60 }
62 61
63 } // namespace examples 62 } // namespace examples
OLDNEW
« no previous file with comments | « no previous file | views/examples/slider_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698