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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 125203005: Resize the widget when top level popup windows created by the content layer are resized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('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 "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 top_level_widget_->GetNativeView()->RemoveObserver(this); 125 top_level_widget_->GetNativeView()->RemoveObserver(this);
126 // When we receive a notification that the child of the window created 126 // When we receive a notification that the child of the window created
127 // above is being destroyed we go ahead and initiate the destruction of 127 // above is being destroyed we go ahead and initiate the destruction of
128 // the corresponding widget. 128 // the corresponding widget.
129 top_level_widget_->Close(); 129 top_level_widget_->Close();
130 top_level_widget_ = NULL; 130 top_level_widget_ = NULL;
131 } 131 }
132 delete this; 132 delete this;
133 } 133 }
134 134
135 virtual void OnWindowBoundsChanged(aura::Window* window,
136 const gfx::Rect& old_bounds,
137 const gfx::Rect& new_bounds) OVERRIDE {
138 if (top_level_widget_ && window != top_level_widget_->GetNativeView())
sky 2014/01/07 16:36:33 Rather than window != can you test for the window
ananta 2014/01/07 18:56:08 Done. Added a child_window_ member to track the pa
139 top_level_widget_->SetSize(new_bounds.size());
140 }
141
135 private: 142 private:
136 DesktopNativeWidgetTopLevelHandler() 143 DesktopNativeWidgetTopLevelHandler()
137 : top_level_widget_(NULL) {} 144 : top_level_widget_(NULL) {}
138 145
139 virtual ~DesktopNativeWidgetTopLevelHandler() {} 146 virtual ~DesktopNativeWidgetTopLevelHandler() {}
140 147
141 Widget* top_level_widget_; 148 Widget* top_level_widget_;
142 149
143 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetTopLevelHandler); 150 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetTopLevelHandler);
144 }; 151 };
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 input_method_event_filter_->SetInputMethodPropertyInRootWindow( 1123 input_method_event_filter_->SetInputMethodPropertyInRootWindow(
1117 root_window_->window()); 1124 root_window_->window());
1118 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); 1125 root_window_event_filter_->AddHandler(input_method_event_filter_.get());
1119 } 1126 }
1120 1127
1121 void DesktopNativeWidgetAura::UpdateWindowTransparency() { 1128 void DesktopNativeWidgetAura::UpdateWindowTransparency() {
1122 content_window_->SetTransparent(ShouldUseNativeFrame()); 1129 content_window_->SetTransparent(ShouldUseNativeFrame());
1123 } 1130 }
1124 1131
1125 } // namespace views 1132 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698