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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 1053143002: Make View::Paint use ui::PaintRecorder to access PaintContext's canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paintrecorder: . Created 5 years, 8 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) 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 "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 } 1004 }
1005 1005
1006 bool DesktopNativeWidgetAura::CanFocus() { 1006 bool DesktopNativeWidgetAura::CanFocus() {
1007 return true; 1007 return true;
1008 } 1008 }
1009 1009
1010 void DesktopNativeWidgetAura::OnCaptureLost() { 1010 void DesktopNativeWidgetAura::OnCaptureLost() {
1011 native_widget_delegate_->OnMouseCaptureLost(); 1011 native_widget_delegate_->OnMouseCaptureLost();
1012 } 1012 }
1013 1013
1014 void DesktopNativeWidgetAura::OnPaint(gfx::Canvas* canvas) { 1014 void DesktopNativeWidgetAura::OnPaint(const ui::PaintContext& context) {
1015 native_widget_delegate_->OnNativeWidgetPaint(canvas); 1015 native_widget_delegate_->OnNativeWidgetPaint(context);
1016 } 1016 }
1017 1017
1018 void DesktopNativeWidgetAura::OnDeviceScaleFactorChanged( 1018 void DesktopNativeWidgetAura::OnDeviceScaleFactorChanged(
1019 float device_scale_factor) { 1019 float device_scale_factor) {
1020 } 1020 }
1021 1021
1022 void DesktopNativeWidgetAura::OnWindowDestroying(aura::Window* window) { 1022 void DesktopNativeWidgetAura::OnWindowDestroying(aura::Window* window) {
1023 // Cleanup happens in OnHostClosed(). 1023 // Cleanup happens in OnHostClosed().
1024 } 1024 }
1025 1025
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 if (cursor_reference_count_ == 0) { 1239 if (cursor_reference_count_ == 0) {
1240 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1240 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1241 // for cleaning up |cursor_manager_|. 1241 // for cleaning up |cursor_manager_|.
1242 delete cursor_manager_; 1242 delete cursor_manager_;
1243 native_cursor_manager_ = NULL; 1243 native_cursor_manager_ = NULL;
1244 cursor_manager_ = NULL; 1244 cursor_manager_ = NULL;
1245 } 1245 }
1246 } 1246 }
1247 1247
1248 } // namespace views 1248 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698