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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 bool RenderWidgetHostViewMac::DelegatedFrameHostIsVisible() const { | 419 bool RenderWidgetHostViewMac::DelegatedFrameHostIsVisible() const { |
420 return !render_widget_host_->is_hidden(); | 420 return !render_widget_host_->is_hidden(); |
421 } | 421 } |
422 | 422 |
423 SkColor RenderWidgetHostViewMac::DelegatedFrameHostGetGutterColor( | 423 SkColor RenderWidgetHostViewMac::DelegatedFrameHostGetGutterColor( |
424 SkColor color) const { | 424 SkColor color) const { |
425 // When making an element on the page fullscreen the element's background | 425 // When making an element on the page fullscreen the element's background |
426 // may not match the page's, so use black as the gutter color to avoid | 426 // may not match the page's, so use black as the gutter color to avoid |
427 // flashes of brighter colors during the transition. | 427 // flashes of brighter colors during the transition. |
428 if (render_widget_host_->delegate() && | 428 if (render_widget_host_->delegate() && |
429 render_widget_host_->delegate()->IsFullscreenForCurrentTab( | 429 render_widget_host_->delegate()->IsFullscreenForCurrentTab()) { |
430 render_widget_host_)) { | |
431 return SK_ColorBLACK; | 430 return SK_ColorBLACK; |
432 } | 431 } |
433 return color; | 432 return color; |
434 } | 433 } |
435 | 434 |
436 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const { | 435 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const { |
437 return GetViewBounds().size(); | 436 return GetViewBounds().size(); |
438 } | 437 } |
439 | 438 |
440 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const { | 439 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const { |
(...skipping 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3456 | 3455 |
3457 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3456 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3458 // regions that are not draggable. (See ControlRegionView in | 3457 // regions that are not draggable. (See ControlRegionView in |
3459 // native_app_window_cocoa.mm). This requires the render host view to be | 3458 // native_app_window_cocoa.mm). This requires the render host view to be |
3460 // draggable by default. | 3459 // draggable by default. |
3461 - (BOOL)mouseDownCanMoveWindow { | 3460 - (BOOL)mouseDownCanMoveWindow { |
3462 return YES; | 3461 return YES; |
3463 } | 3462 } |
3464 | 3463 |
3465 @end | 3464 @end |
OLD | NEW |