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

Side by Side Diff: chrome/browser/ui/views/about_chrome_view.cc

Issue 10384068: views: Have a more accurate name for View parent_owned accessors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 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 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/ui/views/about_chrome_view.h" 5 #include "chrome/browser/ui/views/about_chrome_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 #endif 136 #endif
137 } 137 }
138 138
139 void AboutChromeView::Init() { 139 void AboutChromeView::Init() {
140 text_direction_is_rtl_ = base::i18n::IsRTL(); 140 text_direction_is_rtl_ = base::i18n::IsRTL();
141 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 141 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
142 142
143 // Views we will add to the *parent* of this dialog, since it will display 143 // Views we will add to the *parent* of this dialog, since it will display
144 // next to the buttons which we don't draw ourselves. 144 // next to the buttons which we don't draw ourselves.
145 throbber_.reset(new views::Throbber(50, true)); 145 throbber_.reset(new views::Throbber(50, true));
146 throbber_->set_parent_owned(false); 146 throbber_->set_owned_by_client();
147 throbber_->SetVisible(false); 147 throbber_->SetVisible(false);
148 148
149 SkBitmap* success_image = rb.GetBitmapNamed(IDR_UPDATE_UPTODATE); 149 SkBitmap* success_image = rb.GetBitmapNamed(IDR_UPDATE_UPTODATE);
150 success_indicator_.SetImage(*success_image); 150 success_indicator_.SetImage(*success_image);
151 success_indicator_.set_parent_owned(false); 151 success_indicator_.set_owned_by_client();
152 152
153 SkBitmap* update_available_image = rb.GetBitmapNamed(IDR_UPDATE_AVAILABLE); 153 SkBitmap* update_available_image = rb.GetBitmapNamed(IDR_UPDATE_AVAILABLE);
154 update_available_indicator_.SetImage(*update_available_image); 154 update_available_indicator_.SetImage(*update_available_image);
155 update_available_indicator_.set_parent_owned(false); 155 update_available_indicator_.set_owned_by_client();
156 156
157 SkBitmap* timeout_image = rb.GetBitmapNamed(IDR_UPDATE_FAIL); 157 SkBitmap* timeout_image = rb.GetBitmapNamed(IDR_UPDATE_FAIL);
158 timeout_indicator_.SetImage(*timeout_image); 158 timeout_indicator_.SetImage(*timeout_image);
159 timeout_indicator_.set_parent_owned(false); 159 timeout_indicator_.set_owned_by_client();
160 160
161 update_label_.SetVisible(false); 161 update_label_.SetVisible(false);
162 update_label_.set_parent_owned(false); 162 update_label_.set_owned_by_client();
163 163
164 // Regular view controls we draw by ourself. First, we add the background 164 // Regular view controls we draw by ourself. First, we add the background
165 // image for the dialog. We have two different background bitmaps, one for 165 // image for the dialog. We have two different background bitmaps, one for
166 // LTR UIs and one for RTL UIs. We load the correct bitmap based on the UI 166 // LTR UIs and one for RTL UIs. We load the correct bitmap based on the UI
167 // layout of the view. 167 // layout of the view.
168 about_dlg_background_logo_ = new views::ImageView(); 168 about_dlg_background_logo_ = new views::ImageView();
169 SkBitmap* about_background_logo = rb.GetBitmapNamed(base::i18n::IsRTL() ? 169 SkBitmap* about_background_logo = rb.GetBitmapNamed(base::i18n::IsRTL() ?
170 IDR_ABOUT_BACKGROUND_RTL : IDR_ABOUT_BACKGROUND); 170 IDR_ABOUT_BACKGROUND_RTL : IDR_ABOUT_BACKGROUND);
171 171
172 about_dlg_background_logo_->SetImage(*about_background_logo); 172 about_dlg_background_logo_->SetImage(*about_background_logo);
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 int height = error_label_->GetHeightForWidth( 789 int height = error_label_->GetHeightForWidth(
790 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + 790 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) +
791 views::kRelatedControlVerticalSpacing; 791 views::kRelatedControlVerticalSpacing;
792 window_rect.set_height(window_rect.height() + height); 792 window_rect.set_height(window_rect.height() + height);
793 GetWidget()->SetBounds(window_rect); 793 GetWidget()->SetBounds(window_rect);
794 794
795 return height; 795 return height;
796 } 796 }
797 797
798 #endif 798 #endif
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698