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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 71243002: Support headless content_shell for linux/aura. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the crash seen with earlier patch in popup tests! Created 7 years, 1 month 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 | « no previous file | content/shell/browser/shell.h » ('j') | 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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 // to never get a chance to filter events. See crbug.com/160589. 506 // to never get a chance to filter events. See crbug.com/160589.
507 DCHECK(old_child->popup_parent_host_view_ == popup_parent_host_view_); 507 DCHECK(old_child->popup_parent_host_view_ == popup_parent_host_view_);
508 old_child->popup_parent_host_view_ = NULL; 508 old_child->popup_parent_host_view_ = NULL;
509 } 509 }
510 popup_parent_host_view_->popup_child_host_view_ = this; 510 popup_parent_host_view_->popup_child_host_view_ = this;
511 window_->SetType(aura::client::WINDOW_TYPE_MENU); 511 window_->SetType(aura::client::WINDOW_TYPE_MENU);
512 window_->Init(ui::LAYER_TEXTURED); 512 window_->Init(ui::LAYER_TEXTURED);
513 window_->SetName("RenderWidgetHostViewAura"); 513 window_->SetName("RenderWidgetHostViewAura");
514 514
515 aura::Window* root = popup_parent_host_view_->window_->GetRootWindow(); 515 aura::Window* root = popup_parent_host_view_->window_->GetRootWindow();
516 aura::client::ParentWindowWithContext(window_, root, bounds_in_screen); 516 if (root)
517 aura::client::ParentWindowWithContext(window_, root, bounds_in_screen);
517 518
518 SetBounds(bounds_in_screen); 519 SetBounds(bounds_in_screen);
519 Show(); 520 Show();
520 } 521 }
521 522
522 void RenderWidgetHostViewAura::InitAsFullscreen( 523 void RenderWidgetHostViewAura::InitAsFullscreen(
523 RenderWidgetHostView* reference_host_view) { 524 RenderWidgetHostView* reference_host_view) {
524 is_fullscreen_ = true; 525 is_fullscreen_ = true;
525 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); 526 window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
526 window_->Init(ui::LAYER_TEXTURED); 527 window_->Init(ui::LAYER_TEXTURED);
(...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after
3334 RenderWidgetHost* widget) { 3335 RenderWidgetHost* widget) {
3335 return new RenderWidgetHostViewAura(widget); 3336 return new RenderWidgetHostViewAura(widget);
3336 } 3337 }
3337 3338
3338 // static 3339 // static
3339 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3340 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3340 GetScreenInfoForWindow(results, NULL); 3341 GetScreenInfoForWindow(results, NULL);
3341 } 3342 }
3342 3343
3343 } // namespace content 3344 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/shell/browser/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698