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

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

Issue 1747143002: Remove WebContents::WasHidden() calls in chrome::AddRestoredTab() and TabLoader Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove from TabLoader, fix RenderWidgetHostViewMac Created 4 years, 9 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 | « chrome/browser/ui/browser_tabrestore.cc ('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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 is_loading_(false), 519 is_loading_(false),
520 allow_pause_for_resize_or_repaint_(true), 520 allow_pause_for_resize_or_repaint_(true),
521 is_guest_view_hack_(is_guest_view_hack), 521 is_guest_view_hack_(is_guest_view_hack),
522 fullscreen_parent_host_view_(NULL), 522 fullscreen_parent_host_view_(NULL),
523 weak_factory_(this) { 523 weak_factory_(this) {
524 // |cocoa_view_| owns us and we will be deleted when |cocoa_view_| 524 // |cocoa_view_| owns us and we will be deleted when |cocoa_view_|
525 // goes away. Since we autorelease it, our caller must put 525 // goes away. Since we autorelease it, our caller must put
526 // |GetNativeView()| into the view hierarchy right after calling us. 526 // |GetNativeView()| into the view hierarchy right after calling us.
527 cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc] 527 cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc]
528 initWithRenderWidgetHostViewMac:this] autorelease]; 528 initWithRenderWidgetHostViewMac:this] autorelease];
529 [cocoa_view_ setHidden:render_widget_host_->is_hidden()];
529 530
530 // Paint this view host with |background_color_| when there is no content 531 // Paint this view host with |background_color_| when there is no content
531 // ready to draw. 532 // ready to draw.
532 background_layer_.reset([[CALayer alloc] init]); 533 background_layer_.reset([[CALayer alloc] init]);
533 // Set the default color to be white. This is the wrong thing to do, but many 534 // Set the default color to be white. This is the wrong thing to do, but many
534 // UI components expect this view to be opaque. 535 // UI components expect this view to be opaque.
535 [background_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)]; 536 [background_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
536 [cocoa_view_ setLayer:background_layer_]; 537 [cocoa_view_ setLayer:background_layer_];
537 [cocoa_view_ setWantsLayer:YES]; 538 [cocoa_view_ setWantsLayer:YES];
538 539
(...skipping 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 3446
3446 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3447 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3447 // regions that are not draggable. (See ControlRegionView in 3448 // regions that are not draggable. (See ControlRegionView in
3448 // native_app_window_cocoa.mm). This requires the render host view to be 3449 // native_app_window_cocoa.mm). This requires the render host view to be
3449 // draggable by default. 3450 // draggable by default.
3450 - (BOOL)mouseDownCanMoveWindow { 3451 - (BOOL)mouseDownCanMoveWindow {
3451 return YES; 3452 return YES;
3452 } 3453 }
3453 3454
3454 @end 3455 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698