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

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

Issue 16084008: Restore Views dialog dragging and titlebar system menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a TestBubbleDelegateView hack for hit testing. Created 7 years, 6 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/bubble/bubble_frame_view.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/bubble/bubble_delegate.h" 5 #include "ui/views/bubble/bubble_delegate.h"
6 6
7 #include "ui/base/animation/slide_animation.h" 7 #include "ui/base/animation/slide_animation.h"
8 #include "ui/gfx/color_utils.h" 8 #include "ui/gfx/color_utils.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 #include "ui/native_theme/native_theme.h" 10 #include "ui/native_theme/native_theme.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 widget_(widget) { 54 widget_(widget) {
55 bubble_->GetWidget()->AddObserver(this); 55 bubble_->GetWidget()->AddObserver(this);
56 } 56 }
57 57
58 virtual ~BubbleBorderDelegate() { 58 virtual ~BubbleBorderDelegate() {
59 if (bubble_ && bubble_->GetWidget()) 59 if (bubble_ && bubble_->GetWidget())
60 bubble_->GetWidget()->RemoveObserver(this); 60 bubble_->GetWidget()->RemoveObserver(this);
61 } 61 }
62 62
63 // WidgetDelegate overrides: 63 // WidgetDelegate overrides:
64 virtual bool CanResize() const OVERRIDE { return bubble_->CanResize(); }
64 virtual bool CanActivate() const OVERRIDE { return false; } 65 virtual bool CanActivate() const OVERRIDE { return false; }
65 virtual void DeleteDelegate() OVERRIDE { delete this; } 66 virtual void DeleteDelegate() OVERRIDE { delete this; }
66 virtual Widget* GetWidget() OVERRIDE { return widget_; } 67 virtual Widget* GetWidget() OVERRIDE { return widget_; }
67 virtual const Widget* GetWidget() const OVERRIDE { return widget_; } 68 virtual const Widget* GetWidget() const OVERRIDE { return widget_; }
68 virtual NonClientFrameView* CreateNonClientFrameView( 69 virtual NonClientFrameView* CreateNonClientFrameView(
69 Widget* widget) OVERRIDE { 70 Widget* widget) OVERRIDE {
70 return bubble_->CreateNonClientFrameView(widget); 71 return bubble_->CreateNonClientFrameView(widget);
71 } 72 }
72 73
73 // WidgetObserver overrides: 74 // WidgetObserver overrides:
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 #if defined(OS_WIN) && !defined(USE_AURA) 355 #if defined(OS_WIN) && !defined(USE_AURA)
355 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { 356 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const {
356 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); 357 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView());
357 client_bounds.Offset( 358 client_bounds.Offset(
358 border_widget_->GetWindowBoundsInScreen().OffsetFromOrigin()); 359 border_widget_->GetWindowBoundsInScreen().OffsetFromOrigin());
359 return client_bounds; 360 return client_bounds;
360 } 361 }
361 #endif 362 #endif
362 363
363 } // namespace views 364 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698