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_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 Loading... |
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 Loading... |
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 |
OLD | NEW |