| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 // DelegatedFrameHost, public: | 430 // DelegatedFrameHost, public: |
| 431 | 431 |
| 432 ui::Layer* RenderWidgetHostViewMac::DelegatedFrameHostGetLayer() const { | 432 ui::Layer* RenderWidgetHostViewMac::DelegatedFrameHostGetLayer() const { |
| 433 return root_layer_.get(); | 433 return root_layer_.get(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 bool RenderWidgetHostViewMac::DelegatedFrameHostIsVisible() const { | 436 bool RenderWidgetHostViewMac::DelegatedFrameHostIsVisible() const { |
| 437 return !render_widget_host_->is_hidden(); | 437 return !render_widget_host_->is_hidden(); |
| 438 } | 438 } |
| 439 | 439 |
| 440 SkColor RenderWidgetHostViewMac::DelegatedFrameHostGetGutterColor( |
| 441 SkColor color) const { |
| 442 // When making an element on the page fullscreen the element's background |
| 443 // may not match the page's, so use black as the gutter color to avoid |
| 444 // flashes of brighter colors during the transition. |
| 445 if (render_widget_host_->delegate() && |
| 446 render_widget_host_->delegate()->IsFullscreenForCurrentTab( |
| 447 render_widget_host_)) { |
| 448 return SK_ColorBLACK; |
| 449 } |
| 450 return color; |
| 451 } |
| 452 |
| 440 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const { | 453 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const { |
| 441 return GetViewBounds().size(); | 454 return GetViewBounds().size(); |
| 442 } | 455 } |
| 443 | 456 |
| 444 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const { | 457 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const { |
| 445 // Mac uses the RenderWidgetResizeHelper instead of a resize lock. | 458 // Mac uses the RenderWidgetResizeHelper instead of a resize lock. |
| 446 return false; | 459 return false; |
| 447 } | 460 } |
| 448 | 461 |
| 449 scoped_ptr<ResizeLock> | 462 scoped_ptr<ResizeLock> |
| (...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3395 | 3408 |
| 3396 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3409 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3397 // regions that are not draggable. (See ControlRegionView in | 3410 // regions that are not draggable. (See ControlRegionView in |
| 3398 // native_app_window_cocoa.mm). This requires the render host view to be | 3411 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3399 // draggable by default. | 3412 // draggable by default. |
| 3400 - (BOOL)mouseDownCanMoveWindow { | 3413 - (BOOL)mouseDownCanMoveWindow { |
| 3401 return YES; | 3414 return YES; |
| 3402 } | 3415 } |
| 3403 | 3416 |
| 3404 @end | 3417 @end |
| OLD | NEW |