|
|
Chromium Code Reviews|
Created:
7 years, 2 months ago by sky Modified:
7 years, 2 months ago Reviewers:
Ben Goodger (Google) CC:
chromium-reviews, tfarina, ben+views_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionRenames DNWA::window_ to content_window_
Also converts a couple of calls to GetRootWindow() to
root_window_.get().
BUG=none
TEST=none
R=ben@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=229811
Patch Set 1 #Patch Set 2 : Merge to trunk #
Messages
Total messages: 8 (0 generated)
lgtm
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/29983002/1
Failed to apply patch for
ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
Hunk #3 FAILED at 320.
Hunk #4 succeeded at 357 (offset 1 line).
Hunk #5 succeeded at 370 (offset 1 line).
Hunk #6 FAILED at 382.
Hunk #7 succeeded at 418 (offset 2 lines).
Hunk #8 succeeded at 430 (offset 2 lines).
Hunk #9 succeeded at 439 (offset 2 lines).
Hunk #10 succeeded at 451 (offset 2 lines).
Hunk #11 succeeded at 465 (offset 2 lines).
Hunk #12 succeeded at 494 (offset 2 lines).
Hunk #13 succeeded at 524 (offset 2 lines).
Hunk #14 succeeded at 558 (offset 2 lines).
Hunk #15 succeeded at 572 (offset 2 lines).
Hunk #16 succeeded at 685 (offset 2 lines).
Hunk #17 succeeded at 695 (offset 2 lines).
Hunk #18 succeeded at 723 (offset 2 lines).
Hunk #19 succeeded at 734 (offset 2 lines).
Hunk #20 succeeded at 750 (offset 2 lines).
Hunk #21 succeeded at 825 (offset 2 lines).
Hunk #22 succeeded at 857 (offset 2 lines).
Hunk #23 succeeded at 870 (offset 2 lines).
Hunk #24 succeeded at 914 (offset 2 lines).
Hunk #25 succeeded at 935 (offset 2 lines).
Hunk #26 succeeded at 1010 (offset -4 lines).
Hunk #27 succeeded at 1031 (offset -4 lines).
2 out of 27 hunks FAILED -- saving rejects to file
ui/views/widget/desktop_aura/desktop_native_widget_aura.cc.rej
Patch: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index
347cbb240304129444125658cc4b14034f328d67..645a58be4722b22b6fc1b71d4089a86e9ac2eef7
100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -181,16 +181,16 @@ DesktopNativeWidgetAura::DesktopNativeWidgetAura(
close_widget_factory_(this),
can_activate_(true),
desktop_root_window_host_(NULL),
- window_(new aura::Window(this)),
content_window_container_(NULL),
+ content_window_(new aura::Window(this)),
native_widget_delegate_(delegate),
last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
restore_focus_on_activate_(false),
cursor_(gfx::kNullCursor),
widget_type_(Widget::InitParams::TYPE_WINDOW) {
- window_->SetProperty(kDesktopNativeWidgetAuraKey, this);
- aura::client::SetFocusChangeObserver(window_, this);
- aura::client::SetActivationChangeObserver(window_, this);
+ content_window_->SetProperty(kDesktopNativeWidgetAuraKey, this);
+ aura::client::SetFocusChangeObserver(content_window_, this);
+ aura::client::SetActivationChangeObserver(content_window_, this);
}
DesktopNativeWidgetAura::~DesktopNativeWidgetAura() {
@@ -241,7 +241,7 @@ void DesktopNativeWidgetAura::OnHostClosed() {
root_window_.reset(); // Uses input_method_event_filter_ at destruction.
// RootWindow owns |desktop_root_window_host_|.
desktop_root_window_host_ = NULL;
- window_ = NULL;
+ content_window_ = NULL;
native_widget_delegate_->OnNativeWidgetDestroyed();
if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET)
@@ -320,33 +320,33 @@ void DesktopNativeWidgetAura::InitNativeWidget(
ownership_ = params.ownership;
widget_type_ = params.type;
- NativeWidgetAura::RegisterNativeWidgetForWindow(this, window_);
+ NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
// Animations on TYPE_WINDOW are handled by the OS. Additionally if we
animate
// these windows the size of the window gets augmented, effecting restore
// bounds and maximized windows in bad ways.
if (params.type == Widget::InitParams::TYPE_WINDOW &&
!params.remove_standard_frame) {
- window_->SetProperty(aura::client::kAnimationsDisabledKey, true);
+ content_window_->SetProperty(aura::client::kAnimationsDisabledKey, true);
}
- window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
- window_->Init(params.layer_type);
- corewm::SetShadowType(window_, corewm::SHADOW_TYPE_NONE);
+ content_window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
+ content_window_->Init(params.layer_type);
+ corewm::SetShadowType(content_window_, corewm::SHADOW_TYPE_NONE);
#if defined(OS_LINUX) // TODO(scottmg): http://crbug.com/180071
- window_->Show();
+ content_window_->Show();
#endif
desktop_root_window_host_ = params.desktop_root_window_host ?
params.desktop_root_window_host :
DesktopRootWindowHost::Create(native_widget_delegate_,
this, params.bounds);
- root_window_.reset(desktop_root_window_host_->Init(window_, params));
+ root_window_.reset(desktop_root_window_host_->Init(content_window_, params));
UpdateWindowTransparency();
content_window_container_ = new aura::Window(NULL);
content_window_container_->Init(ui::LAYER_NOT_DRAWN);
content_window_container_->Show();
- content_window_container_->AddChild(window_);
+ content_window_container_->AddChild(content_window_);
root_window_->AddChild(content_window_container_);
OnRootWindowHostResized(root_window_.get());
@@ -356,9 +356,10 @@ void DesktopNativeWidgetAura::InitNativeWidget(
new DesktopNativeWidgetAuraStackingClient(root_window_.get()));
drop_helper_.reset(new DropHelper(
static_cast<internal::RootView*>(GetWidget()->GetRootView())));
- aura::client::SetDragDropDelegate(window_, this);
+ aura::client::SetDragDropDelegate(content_window_, this);
- tooltip_manager_.reset(new views::TooltipManagerAura(window_, GetWidget()));
+ tooltip_manager_.reset(new views::TooltipManagerAura(content_window_,
+ GetWidget()));
tooltip_controller_.reset(
new corewm::TooltipController(
@@ -368,10 +369,9 @@ void DesktopNativeWidgetAura::InitNativeWidget(
if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) {
visibility_controller_.reset(new views::corewm::VisibilityController);
- aura::client::SetVisibilityClient(GetNativeView()->GetRootWindow(),
+ aura::client::SetVisibilityClient(root_window_.get(),
visibility_controller_.get());
- views::corewm::SetChildWindowVisibilityChangesAnimated(
- GetNativeView()->GetRootWindow());
+ views::corewm::SetChildWindowVisibilityChangesAnimated(root_window_.get());
views::corewm::SetChildWindowVisibilityChangesAnimated(
content_window_container_);
}
@@ -382,15 +382,15 @@ void DesktopNativeWidgetAura::InitNativeWidget(
root_window_->AddPreTargetHandler(focus_manager->GetEventHandler());
}
- aura::client::GetFocusClient(window_)->FocusWindow(window_);
+ aura::client::GetFocusClient(content_window_)->FocusWindow(content_window_);
- aura::client::SetActivationDelegate(window_, this);
+ aura::client::SetActivationDelegate(content_window_, this);
shadow_controller_.reset(
new corewm::ShadowController(
aura::client::GetActivationClient(root_window_.get())));
- window_reorderer_.reset(new WindowReorderer(window_,
+ window_reorderer_.reset(new WindowReorderer(content_window_,
GetWidget()->GetRootView()));
}
@@ -416,11 +416,11 @@ const Widget* DesktopNativeWidgetAura::GetWidget() const {
}
gfx::NativeView DesktopNativeWidgetAura::GetNativeView() const {
- return window_;
+ return content_window_;
}
gfx::NativeWindow DesktopNativeWidgetAura::GetNativeWindow() const {
- return window_;
+ return content_window_;
}
Widget* DesktopNativeWidgetAura::GetTopLevelWidget() {
@@ -428,7 +428,7 @@ Widget* DesktopNativeWidgetAura::GetTopLevelWidget() {
}
const ui::Compositor* DesktopNativeWidgetAura::GetCompositor() const {
- return window_ ? window_->layer()->GetCompositor() : NULL;
+ return content_window_ ? content_window_->layer()->GetCompositor() : NULL;
}
ui::Compositor* DesktopNativeWidgetAura::GetCompositor() {
@@ -437,7 +437,7 @@ ui::Compositor* DesktopNativeWidgetAura::GetCompositor() {
}
ui::Layer* DesktopNativeWidgetAura::GetLayer() {
- return window_ ? window_->layer() : NULL;
+ return content_window_ ? content_window_->layer() : NULL;
}
void DesktopNativeWidgetAura::ReorderNativeViews() {
@@ -449,12 +449,13 @@ void DesktopNativeWidgetAura::ViewRemoved(View* view) {
void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name,
void* value) {
- if (window_)
- window_->SetNativeWindowProperty(name, value);
+ if (content_window_)
+ content_window_->SetNativeWindowProperty(name, value);
}
void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const
{
- return window_ ? window_->GetNativeWindowProperty(name) : NULL;
+ return content_window_ ?
+ content_window_->GetNativeWindowProperty(name) : NULL;
}
TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const {
@@ -462,21 +463,21 @@ TooltipManager*
DesktopNativeWidgetAura::GetTooltipManager() const {
}
void DesktopNativeWidgetAura::SetCapture() {
- if (!window_)
+ if (!content_window_)
return;
- window_->SetCapture();
+ content_window_->SetCapture();
}
void DesktopNativeWidgetAura::ReleaseCapture() {
- if (!window_)
+ if (!content_window_)
return;
- window_->ReleaseCapture();
+ content_window_->ReleaseCapture();
}
bool DesktopNativeWidgetAura::HasCapture() const {
- return window_ && window_->HasCapture() &&
+ return content_window_ && content_window_->HasCapture() &&
desktop_root_window_host_->HasCapture();
}
@@ -491,25 +492,25 @@ internal::InputMethodDelegate*
}
void DesktopNativeWidgetAura::CenterWindow(const gfx::Size& size) {
- if (window_)
+ if (content_window_)
desktop_root_window_host_…
(message too large)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/29983002/70001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/29983002/70001
Message was sent while issue was closed.
Committed patchset #2 manually as r229811 (presubmit successful). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
