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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I think the content_unittests timeout on linux_aura is flake, but try to fix it anyway. Created 8 years 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 | Annotate | Revision Log
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/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/browser/renderer_host/dip_util.h" 9 #include "content/browser/renderer_host/dip_util.h"
10 #include "content/browser/renderer_host/overscroll_controller.h" 10 #include "content/browser/renderer_host/overscroll_controller.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 void WebContentsViewAura::CreateView(const gfx::Size& initial_size) { 492 void WebContentsViewAura::CreateView(const gfx::Size& initial_size) {
493 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as 493 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as
494 // if the bookmark bar is not shown and you create a new tab). The right 494 // if the bookmark bar is not shown and you create a new tab). The right
495 // value is set shortly after this, so its safe to ignore. 495 // value is set shortly after this, so its safe to ignore.
496 496
497 window_.reset(new aura::Window(this)); 497 window_.reset(new aura::Window(this));
498 window_->set_owned_by_parent(false); 498 window_->set_owned_by_parent(false);
499 window_->SetType(aura::client::WINDOW_TYPE_CONTROL); 499 window_->SetType(aura::client::WINDOW_TYPE_CONTROL);
500 window_->SetTransparent(false); 500 window_->SetTransparent(false);
501 window_->Init(ui::LAYER_NOT_DRAWN); 501 window_->Init(ui::LAYER_NOT_DRAWN);
502 window_->SetParent(NULL); 502 // TODO(erg): Do something else here later.
503 window_->SetDefaultParentByTargetRoot(NULL, gfx::Rect());
503 window_->layer()->SetMasksToBounds(true); 504 window_->layer()->SetMasksToBounds(true);
504 window_->SetName("WebContentsViewAura"); 505 window_->SetName("WebContentsViewAura");
505 506
506 window_observer_.reset(new WindowObserver(this)); 507 window_observer_.reset(new WindowObserver(this));
507 window_->AddObserver(window_observer_.get()); 508 window_->AddObserver(window_observer_.get());
508 509
509 // delegate_->GetDragDestDelegate() creates a new delegate on every call. 510 // delegate_->GetDragDestDelegate() creates a new delegate on every call.
510 // Hence, we save a reference to it locally. Similar model is used on other 511 // Hence, we save a reference to it locally. Similar model is used on other
511 // platforms as well. 512 // platforms as well.
512 if (delegate_.get()) 513 if (delegate_.get())
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 event.location(), 981 event.location(),
981 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 982 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
982 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 983 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
983 if (drag_dest_delegate_) 984 if (drag_dest_delegate_)
984 drag_dest_delegate_->OnDrop(); 985 drag_dest_delegate_->OnDrop();
985 current_drop_data_.reset(); 986 current_drop_data_.reset();
986 return current_drag_op_; 987 return current_drag_op_;
987 } 988 }
988 989
989 } // namespace content 990 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698