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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 253913003: Remove RenderWidgetHostView*::DidUpdateBackingStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 void RenderWidgetHostViewMac::ImeCompositionRangeChanged( 1003 void RenderWidgetHostViewMac::ImeCompositionRangeChanged(
1004 const gfx::Range& range, 1004 const gfx::Range& range,
1005 const std::vector<gfx::Rect>& character_bounds) { 1005 const std::vector<gfx::Rect>& character_bounds) {
1006 // The RangeChanged message is only sent with valid values. The current 1006 // The RangeChanged message is only sent with valid values. The current
1007 // caret position (start == end) will be sent if there is no IME range. 1007 // caret position (start == end) will be sent if there is no IME range.
1008 [cocoa_view_ setMarkedRange:range.ToNSRange()]; 1008 [cocoa_view_ setMarkedRange:range.ToNSRange()];
1009 composition_range_ = range; 1009 composition_range_ = range;
1010 composition_bounds_ = character_bounds; 1010 composition_bounds_ = character_bounds;
1011 } 1011 }
1012 1012
1013 void RenderWidgetHostViewMac::DidUpdateBackingStore(
1014 const gfx::Rect& scroll_rect,
1015 const gfx::Vector2d& scroll_delta,
1016 const std::vector<gfx::Rect>& copy_rects,
1017 const std::vector<ui::LatencyInfo>& latency_info) {
1018 // This can be called while already inside of a display function. Process the
1019 // new frame in a callback to ensure a clean stack.
1020 // TODO(ccameron): This should never be called. Remove the remaining callers
1021 // and remove all places where the backing store is drawn.
1022 AddPendingLatencyInfo(latency_info);
1023 base::MessageLoop::current()->PostTask(
1024 FROM_HERE,
1025 base::Bind(&RenderWidgetHostViewMac::GotSoftwareFrame,
piman 2014/04/28 20:47:52 Can you remove GotSoftwareFrame too, now?
1026 weak_factory_.GetWeakPtr()));
1027 }
1028
1029 void RenderWidgetHostViewMac::RenderProcessGone(base::TerminationStatus status, 1013 void RenderWidgetHostViewMac::RenderProcessGone(base::TerminationStatus status,
1030 int error_code) { 1014 int error_code) {
1031 Destroy(); 1015 Destroy();
1032 } 1016 }
1033 1017
1034 void RenderWidgetHostViewMac::Destroy() { 1018 void RenderWidgetHostViewMac::Destroy() {
1035 [[NSNotificationCenter defaultCenter] 1019 [[NSNotificationCenter defaultCenter]
1036 removeObserver:cocoa_view_ 1020 removeObserver:cocoa_view_
1037 name:NSWindowWillCloseNotification 1021 name:NSWindowWillCloseNotification
1038 object:popup_window_]; 1022 object:popup_window_];
(...skipping 3272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4311 } 4295 }
4312 4296
4313 - (void)disableRendering { 4297 - (void)disableRendering {
4314 // Disable the fade-out animation as the layer is removed. 4298 // Disable the fade-out animation as the layer is removed.
4315 ScopedCAActionDisabler disabler; 4299 ScopedCAActionDisabler disabler;
4316 [self removeFromSuperlayer]; 4300 [self removeFromSuperlayer];
4317 renderWidgetHostView_ = nil; 4301 renderWidgetHostView_ = nil;
4318 } 4302 }
4319 4303
4320 @end // implementation SoftwareLayer 4304 @end // implementation SoftwareLayer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698