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

Side by Side Diff: chrome/browser/views/autofill_profiles_view_win.h

Issue 3159031: Remove wstrings from bookmarks, part 12. (Closed)
Patch Set: rebased ToT Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ 5 #ifndef CHROME_BROWSER_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_
6 #define CHROME_BROWSER_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ 6 #define CHROME_BROWSER_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <vector> 10 #include <vector>
11 11
12 #include "app/combobox_model.h" 12 #include "app/combobox_model.h"
13 #include "app/table_model.h" 13 #include "app/table_model.h"
14 #include "base/string16.h"
14 #include "chrome/browser/autofill/autofill_dialog.h" 15 #include "chrome/browser/autofill/autofill_dialog.h"
15 #include "chrome/browser/autofill/autofill_profile.h" 16 #include "chrome/browser/autofill/autofill_profile.h"
16 #include "chrome/browser/autofill/personal_data_manager.h" 17 #include "chrome/browser/autofill/personal_data_manager.h"
17 #include "views/controls/combobox/combobox.h" 18 #include "views/controls/combobox/combobox.h"
18 #include "views/controls/link.h" 19 #include "views/controls/link.h"
19 #include "views/controls/table/table_view_observer.h" 20 #include "views/controls/table/table_view_observer.h"
20 #include "views/controls/textfield/textfield.h" 21 #include "views/controls/textfield/textfield.h"
21 #include "views/focus/focus_manager.h" 22 #include "views/focus/focus_manager.h"
22 #include "views/view.h" 23 #include "views/view.h"
23 #include "views/window/dialog_delegate.h" 24 #include "views/window/dialog_delegate.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 371
371 // Call this function if one of the labels has changed 372 // Call this function if one of the labels has changed
372 void NotifyChanged(); 373 void NotifyChanged();
373 374
374 // Gets index of the item in the model or -1 if not found. 375 // Gets index of the item in the model or -1 if not found.
375 int GetIndex(int unique_id); 376 int GetIndex(int unique_id);
376 377
377 // Overridden from ComboboxModel: 378 // Overridden from ComboboxModel:
378 // Public as they are used from EditableSetViewContents. 379 // Public as they are used from EditableSetViewContents.
379 virtual int GetItemCount(); 380 virtual int GetItemCount();
380 virtual std::wstring GetItemAt(int index); 381 virtual string16 GetItemAt(int index);
381 382
382 private: 383 private:
383 std::list<views::Combobox*> combo_boxes_; 384 std::list<views::Combobox*> combo_boxes_;
384 std::vector<EditableSetInfo> address_labels_; 385 std::vector<EditableSetInfo> address_labels_;
385 bool is_billing_; 386 bool is_billing_;
386 387
387 DISALLOW_COPY_AND_ASSIGN(AddressComboBoxModel); 388 DISALLOW_COPY_AND_ASSIGN(AddressComboBoxModel);
388 }; 389 };
389 390
390 class StringVectorComboboxModel : public ComboboxModel { 391 class StringVectorComboboxModel : public ComboboxModel {
391 public: 392 public:
392 StringVectorComboboxModel() {} 393 StringVectorComboboxModel() {}
393 virtual ~StringVectorComboboxModel() {} 394 virtual ~StringVectorComboboxModel() {}
394 395
395 // Sets the vector of the strings for the combobox. Swaps content with 396 // Sets the vector of the strings for the combobox. Swaps content with
396 // |source|. 397 // |source|.
397 void set_cb_strings(std::vector<std::wstring> *source); 398 void set_cb_strings(std::vector<std::wstring> *source);
398 399
399 // Overridden from ComboboxModel: 400 // Overridden from ComboboxModel:
400 virtual int GetItemCount(); 401 virtual int GetItemCount();
401 virtual std::wstring GetItemAt(int index); 402 virtual string16 GetItemAt(int index);
402 403
403 // Find an index of the item in the model, -1 if not present. 404 // Find an index of the item in the model, -1 if not present.
404 int GetIndex(const std::wstring& value); 405 int GetIndex(const std::wstring& value);
405 406
406 private: 407 private:
407 std::vector<std::wstring> cb_strings_; 408 std::vector<std::wstring> cb_strings_;
408 409
409 DISALLOW_COPY_AND_ASSIGN(StringVectorComboboxModel); 410 DISALLOW_COPY_AND_ASSIGN(StringVectorComboboxModel);
410 }; 411 };
411 412
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 scoped_ptr<ContentListTableModel> table_model_; 462 scoped_ptr<ContentListTableModel> table_model_;
462 views::FocusManager* focus_manager_; 463 views::FocusManager* focus_manager_;
463 bool child_dialog_opened_; 464 bool child_dialog_opened_;
464 465
465 static AutoFillProfilesView* instance_; 466 static AutoFillProfilesView* instance_;
466 467
467 DISALLOW_COPY_AND_ASSIGN(AutoFillProfilesView); 468 DISALLOW_COPY_AND_ASSIGN(AutoFillProfilesView);
468 }; 469 };
469 470
470 #endif // CHROME_BROWSER_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ 471 #endif // CHROME_BROWSER_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/language_combobox_model.cc ('k') | chrome/browser/views/autofill_profiles_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698