OLD | NEW |
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 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 void RenderWidgetHostViewMac::WasOccluded() { | 885 void RenderWidgetHostViewMac::WasOccluded() { |
886 if (render_widget_host_->is_hidden()) | 886 if (render_widget_host_->is_hidden()) |
887 return; | 887 return; |
888 | 888 |
889 // Note that the following call to WasHidden() can trigger thumbnail | 889 // Note that the following call to WasHidden() can trigger thumbnail |
890 // generation on behalf of the NTP, and that cannot succeed if the browser | 890 // generation on behalf of the NTP, and that cannot succeed if the browser |
891 // compositor view has been suspended. Therefore these two statements must | 891 // compositor view has been suspended. Therefore these two statements must |
892 // occur in this specific order. However, because thumbnail generation is | 892 // occur in this specific order. However, because thumbnail generation is |
893 // asychronous, that operation won't run before SuspendBrowserCompositorView() | 893 // asychronous, that operation won't run before SuspendBrowserCompositorView() |
894 // completes. As a result you won't get a thumbnail for the page unless you | 894 // completes. As a result you won't get a thumbnail for the page unless you |
895 // happen to switch back to it. See http://crbug.com/530707 . | 895 // execute these two statements in this specific order. |
896 render_widget_host_->WasHidden(); | 896 render_widget_host_->WasHidden(); |
897 SuspendBrowserCompositorView(); | 897 SuspendBrowserCompositorView(); |
898 } | 898 } |
899 | 899 |
900 void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { | 900 void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { |
901 gfx::Rect rect = GetViewBounds(); | 901 gfx::Rect rect = GetViewBounds(); |
902 rect.set_size(size); | 902 rect.set_size(size); |
903 SetBounds(rect); | 903 SetBounds(rect); |
904 } | 904 } |
905 | 905 |
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3438 | 3438 |
3439 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3439 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3440 // regions that are not draggable. (See ControlRegionView in | 3440 // regions that are not draggable. (See ControlRegionView in |
3441 // native_app_window_cocoa.mm). This requires the render host view to be | 3441 // native_app_window_cocoa.mm). This requires the render host view to be |
3442 // draggable by default. | 3442 // draggable by default. |
3443 - (BOOL)mouseDownCanMoveWindow { | 3443 - (BOOL)mouseDownCanMoveWindow { |
3444 return YES; | 3444 return YES; |
3445 } | 3445 } |
3446 | 3446 |
3447 @end | 3447 @end |
OLD | NEW |