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

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

Issue 1884043002: Use black for resize gutter in tab fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | 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 #include <stdint.h> 10 #include <stdint.h>
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // DelegatedFrameHost, public: 408 // DelegatedFrameHost, public:
409 409
410 ui::Layer* RenderWidgetHostViewMac::DelegatedFrameHostGetLayer() const { 410 ui::Layer* RenderWidgetHostViewMac::DelegatedFrameHostGetLayer() const {
411 return root_layer_.get(); 411 return root_layer_.get();
412 } 412 }
413 413
414 bool RenderWidgetHostViewMac::DelegatedFrameHostIsVisible() const { 414 bool RenderWidgetHostViewMac::DelegatedFrameHostIsVisible() const {
415 return !render_widget_host_->is_hidden(); 415 return !render_widget_host_->is_hidden();
416 } 416 }
417 417
418 SkColor RenderWidgetHostViewMac::DelegatedFrameHostGetGutterColor(
419 SkColor color) const {
420 // When making an element on the page fullscreen the element's background
421 // may not match the page's, so use black as the gutter color to avoid
422 // flashes of brighter colors during the transition.
423 if (render_widget_host_->delegate() &&
424 render_widget_host_->delegate()->IsFullscreenForCurrentTab(
425 render_widget_host_)) {
426 return SK_ColorBLACK;
427 }
428 return color;
429 }
430
418 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const { 431 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const {
419 return GetViewBounds().size(); 432 return GetViewBounds().size();
420 } 433 }
421 434
422 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const { 435 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const {
423 // Mac uses the RenderWidgetResizeHelper instead of a resize lock. 436 // Mac uses the RenderWidgetResizeHelper instead of a resize lock.
424 return false; 437 return false;
425 } 438 }
426 439
427 std::unique_ptr<ResizeLock> 440 std::unique_ptr<ResizeLock>
(...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 3427
3415 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3428 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3416 // regions that are not draggable. (See ControlRegionView in 3429 // regions that are not draggable. (See ControlRegionView in
3417 // native_app_window_cocoa.mm). This requires the render host view to be 3430 // native_app_window_cocoa.mm). This requires the render host view to be
3418 // draggable by default. 3431 // draggable by default.
3419 - (BOOL)mouseDownCanMoveWindow { 3432 - (BOOL)mouseDownCanMoveWindow {
3420 return YES; 3433 return YES;
3421 } 3434 }
3422 3435
3423 @end 3436 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698