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

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

Issue 1199543003: Fix tab switch time regression from backgrounded renderers change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 ui::TAB_SHOW_COMPONENT, 902 ui::TAB_SHOW_COMPONENT,
903 render_widget_host_->GetLatencyComponentId(), 903 render_widget_host_->GetLatencyComponentId(),
904 0); 904 0);
905 render_widget_host_->WasShown(renderer_latency_info); 905 render_widget_host_->WasShown(renderer_latency_info);
906 } 906 }
907 907
908 void RenderWidgetHostViewMac::WasOccluded() { 908 void RenderWidgetHostViewMac::WasOccluded() {
909 if (render_widget_host_->is_hidden()) 909 if (render_widget_host_->is_hidden())
910 return; 910 return;
911 911
912 SuspendBrowserCompositorView();
Alexei Svitkine (slow) 2015/06/22 17:13:17 Nit: Since the order is significant, please add a
912 render_widget_host_->WasHidden(); 913 render_widget_host_->WasHidden();
913 SuspendBrowserCompositorView();
914 } 914 }
915 915
916 void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { 916 void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) {
917 gfx::Rect rect = GetViewBounds(); 917 gfx::Rect rect = GetViewBounds();
918 rect.set_size(size); 918 rect.set_size(size);
919 SetBounds(rect); 919 SetBounds(rect);
920 } 920 }
921 921
922 void RenderWidgetHostViewMac::SetBounds(const gfx::Rect& rect) { 922 void RenderWidgetHostViewMac::SetBounds(const gfx::Rect& rect) {
923 // |rect.size()| is view coordinates, |rect.origin| is screen coordinates, 923 // |rect.size()| is view coordinates, |rect.origin| is screen coordinates,
(...skipping 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3290 3290
3291 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3291 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3292 // regions that are not draggable. (See ControlRegionView in 3292 // regions that are not draggable. (See ControlRegionView in
3293 // native_app_window_cocoa.mm). This requires the render host view to be 3293 // native_app_window_cocoa.mm). This requires the render host view to be
3294 // draggable by default. 3294 // draggable by default.
3295 - (BOOL)mouseDownCanMoveWindow { 3295 - (BOOL)mouseDownCanMoveWindow {
3296 return YES; 3296 return YES;
3297 } 3297 }
3298 3298
3299 @end 3299 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698