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

Side by Side Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
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 "chrome/browser/chromeos/input_method/candidate_window.h" 5 #include "chrome/browser/chromeos/input_method/candidate_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 859
860 void CandidateWindowView::ShowAuxiliaryText() { 860 void CandidateWindowView::ShowAuxiliaryText() {
861 views::View* target_area = ( 861 views::View* target_area = (
862 lookup_table_.orientation == InputMethodLookupTable::kHorizontal ? 862 lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
863 header_area_ : footer_area_); 863 header_area_ : footer_area_);
864 views::View* target_contents = ( 864 views::View* target_contents = (
865 lookup_table_.orientation == InputMethodLookupTable::kHorizontal ? 865 lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
866 header_area_contents_.get() : 866 header_area_contents_.get() :
867 footer_area_contents_.get()); 867 footer_area_contents_.get());
868 868
869 if (!target_area->HasChildView(target_contents)) { 869 if (target_contents->parent() != target_area) {
870 // If contents not in display area, put it in. 870 // If contents not in display area, put it in.
871 target_area->RemoveAllChildViews(false); // Don't delete child views. 871 target_area->RemoveAllChildViews(false); // Don't delete child views.
872 target_area->AddChildView(target_contents); 872 target_area->AddChildView(target_contents);
873 } 873 }
874 } 874 }
875 875
876 void CandidateWindowView::UpdateAuxiliaryText(const std::string& utf8_text) { 876 void CandidateWindowView::UpdateAuxiliaryText(const std::string& utf8_text) {
877 views::Label* target_label = ( 877 views::Label* target_label = (
878 lookup_table_.orientation == InputMethodLookupTable::kHorizontal ? 878 lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
879 header_label_ : footer_label_); 879 header_label_ : footer_label_);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 1418
1419 CandidateWindowController::~CandidateWindowController() { 1419 CandidateWindowController::~CandidateWindowController() {
1420 delete impl_; 1420 delete impl_;
1421 } 1421 }
1422 1422
1423 bool CandidateWindowController::Init() { 1423 bool CandidateWindowController::Init() {
1424 return impl_->Init(); 1424 return impl_->Init();
1425 } 1425 }
1426 1426
1427 } // namespace chromeos 1427 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/browser_view.cc ('k') | chrome/browser/chromeos/login/background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698