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

Side by Side Diff: ui/views/bubble/tray_bubble_view.cc

Issue 89503003: Close bubble widget when its anchor widget bounds has changed and move_with_anchor is false. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « ui/views/bubble/bubble_delegate_unittest.cc ('k') | no next file » | 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/bubble/tray_bubble_view.h" 5 #include "ui/views/bubble/tray_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 const InitParams& init_params) 318 const InitParams& init_params)
319 : BubbleDelegateView(anchor, init_params.arrow), 319 : BubbleDelegateView(anchor, init_params.arrow),
320 params_(init_params), 320 params_(init_params),
321 delegate_(delegate), 321 delegate_(delegate),
322 preferred_width_(init_params.min_width), 322 preferred_width_(init_params.min_width),
323 bubble_border_(NULL), 323 bubble_border_(NULL),
324 is_gesture_dragging_(false), 324 is_gesture_dragging_(false),
325 mouse_actively_entered_(false) { 325 mouse_actively_entered_(false) {
326 set_parent_window(parent_window); 326 set_parent_window(parent_window);
327 set_notify_enter_exit_on_child(true); 327 set_notify_enter_exit_on_child(true);
328 set_move_with_anchor(true);
328 set_close_on_deactivate(init_params.close_on_deactivate); 329 set_close_on_deactivate(init_params.close_on_deactivate);
329 set_margins(gfx::Insets()); 330 set_margins(gfx::Insets());
330 bubble_border_ = new TrayBubbleBorder(this, GetAnchorView(), params_); 331 bubble_border_ = new TrayBubbleBorder(this, GetAnchorView(), params_);
331 if (get_use_acceleration_when_possible()) { 332 if (get_use_acceleration_when_possible()) {
332 SetPaintToLayer(true); 333 SetPaintToLayer(true);
333 SetFillsBoundsOpaquely(true); 334 SetFillsBoundsOpaquely(true);
334 335
335 bubble_content_mask_.reset( 336 bubble_content_mask_.reset(
336 new TrayBubbleContentMask(bubble_border_->GetBorderCornerRadius())); 337 new TrayBubbleContentMask(bubble_border_->GetBorderCornerRadius()));
337 } 338 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 const ViewHierarchyChangedDetails& details) { 502 const ViewHierarchyChangedDetails& details) {
502 if (get_use_acceleration_when_possible() && details.is_add && 503 if (get_use_acceleration_when_possible() && details.is_add &&
503 details.child == this) { 504 details.child == this) {
504 details.parent->SetPaintToLayer(true); 505 details.parent->SetPaintToLayer(true);
505 details.parent->SetFillsBoundsOpaquely(true); 506 details.parent->SetFillsBoundsOpaquely(true);
506 details.parent->layer()->SetMasksToBounds(true); 507 details.parent->layer()->SetMasksToBounds(true);
507 } 508 }
508 } 509 }
509 510
510 } // namespace views 511 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698