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

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, 8 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
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void RenderWidgetHostViewMac::DelegatedFrameHostOverrideGutterColor(
441 SkColor* color) const {
442 // In fullscreen mode resizing is uncommon, so it makes more sense to make
443 // the initial switch to fullscreen mode look better by using black as the
444 // gutter color.
445 if (render_widget_host_->delegate()->IsFullscreenForCurrentTab(
446 render_widget_host_)) {
447 *color = SK_ColorBLACK;
448 }
449 }
450
440 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const { 451 gfx::Size RenderWidgetHostViewMac::DelegatedFrameHostDesiredSizeInDIP() const {
441 return GetViewBounds().size(); 452 return GetViewBounds().size();
442 } 453 }
443 454
444 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const { 455 bool RenderWidgetHostViewMac::DelegatedFrameCanCreateResizeLock() const {
445 // Mac uses the RenderWidgetResizeHelper instead of a resize lock. 456 // Mac uses the RenderWidgetResizeHelper instead of a resize lock.
446 return false; 457 return false;
447 } 458 }
448 459
449 std::unique_ptr<ResizeLock> 460 std::unique_ptr<ResizeLock>
(...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after
3395 3406
3396 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3407 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3397 // regions that are not draggable. (See ControlRegionView in 3408 // regions that are not draggable. (See ControlRegionView in
3398 // native_app_window_cocoa.mm). This requires the render host view to be 3409 // native_app_window_cocoa.mm). This requires the render host view to be
3399 // draggable by default. 3410 // draggable by default.
3400 - (BOOL)mouseDownCanMoveWindow { 3411 - (BOOL)mouseDownCanMoveWindow {
3401 return YES; 3412 return YES;
3402 } 3413 }
3403 3414
3404 @end 3415 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698