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

Side by Side Diff: chrome/browser/chromeos/options/network_config_view.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | 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/chromeos/options/network_config_view.h" 5 #include "chrome/browser/chromeos/options/network_config_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() { 293 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() {
294 return (managed_ && visible()) ? image_view_->GetPreferredSize() 294 return (managed_ && visible()) ? image_view_->GetPreferredSize()
295 : gfx::Size(); 295 : gfx::Size();
296 } 296 }
297 297
298 void ControlledSettingIndicatorView::Layout() { 298 void ControlledSettingIndicatorView::Layout() {
299 image_view_->SetBounds(0, 0, width(), height()); 299 image_view_->SetBounds(0, 0, width(), height());
300 } 300 }
301 301
302 void ControlledSettingIndicatorView::OnMouseEntered( 302 void ControlledSettingIndicatorView::OnMouseEntered(
303 const views::MouseEvent& event) { 303 const ui::MouseEvent& event) {
304 image_view_->SetImage(color_image_); 304 image_view_->SetImage(color_image_);
305 } 305 }
306 306
307 void ControlledSettingIndicatorView::OnMouseExited( 307 void ControlledSettingIndicatorView::OnMouseExited(
308 const views::MouseEvent& event) { 308 const ui::MouseEvent& event) {
309 image_view_->SetImage(gray_image_); 309 image_view_->SetImage(gray_image_);
310 } 310 }
311 311
312 void ControlledSettingIndicatorView::Init() { 312 void ControlledSettingIndicatorView::Init() {
313 color_image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 313 color_image_ = ResourceBundle::GetSharedInstance().GetImageNamed(
314 IDR_CONTROLLED_SETTING_MANDATORY).ToImageSkia(); 314 IDR_CONTROLLED_SETTING_MANDATORY).ToImageSkia();
315 gray_image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 315 gray_image_ = ResourceBundle::GetSharedInstance().GetImageNamed(
316 IDR_CONTROLLED_SETTING_MANDATORY_GRAY).ToImageSkia(); 316 IDR_CONTROLLED_SETTING_MANDATORY_GRAY).ToImageSkia();
317 image_view_ = new views::ImageView(); 317 image_view_ = new views::ImageView();
318 // Disable |image_view_| so mouse events propagate to the parent. 318 // Disable |image_view_| so mouse events propagate to the parent.
319 image_view_->SetEnabled(false); 319 image_view_->SetEnabled(false);
320 image_view_->SetImage(gray_image_); 320 image_view_->SetImage(gray_image_);
321 image_view_->SetTooltipText( 321 image_view_->SetTooltipText(
322 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); 322 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
323 AddChildView(image_view_); 323 AddChildView(image_view_);
324 } 324 }
325 325
326 } // namespace chromeos 326 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.h ('k') | chrome/browser/event_disposition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698