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

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

Issue 22320003: Cleanup Views bubble tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Views bubble tests. Created 7 years, 4 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 | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/bubble/bubble_delegate_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/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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bubble_->GetWidget()->AddObserver(this); 59 bubble_->GetWidget()->AddObserver(this);
60 } 60 }
61 61
62 virtual ~BubbleBorderDelegate() { 62 virtual ~BubbleBorderDelegate() {
63 if (bubble_ && bubble_->GetWidget()) 63 if (bubble_ && bubble_->GetWidget())
64 bubble_->GetWidget()->RemoveObserver(this); 64 bubble_->GetWidget()->RemoveObserver(this);
65 } 65 }
66 66
67 // WidgetDelegate overrides: 67 // WidgetDelegate overrides:
68 virtual bool CanActivate() const OVERRIDE { return false; } 68 virtual bool CanActivate() const OVERRIDE { return false; }
69 virtual string16 GetWindowTitle() const { 69 virtual string16 GetWindowTitle() const OVERRIDE {
70 return bubble_->GetWindowTitle(); 70 return bubble_->GetWindowTitle();
71 } 71 }
72 virtual bool ShouldShowCloseButton() const OVERRIDE { 72 virtual bool ShouldShowCloseButton() const OVERRIDE {
73 return bubble_->ShouldShowCloseButton(); 73 return bubble_->ShouldShowCloseButton();
74 } 74 }
75 virtual void DeleteDelegate() OVERRIDE { delete this; } 75 virtual void DeleteDelegate() OVERRIDE { delete this; }
76 virtual Widget* GetWidget() OVERRIDE { return widget_; } 76 virtual Widget* GetWidget() OVERRIDE { return widget_; }
77 virtual const Widget* GetWidget() const OVERRIDE { return widget_; } 77 virtual const Widget* GetWidget() const OVERRIDE { return widget_; }
78 virtual NonClientFrameView* CreateNonClientFrameView( 78 virtual NonClientFrameView* CreateNonClientFrameView(
79 Widget* widget) OVERRIDE { 79 Widget* widget) OVERRIDE {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 #if defined(OS_WIN) && !defined(USE_AURA) 399 #if defined(OS_WIN) && !defined(USE_AURA)
400 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { 400 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const {
401 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); 401 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView());
402 client_bounds.Offset( 402 client_bounds.Offset(
403 border_widget_->GetWindowBoundsInScreen().OffsetFromOrigin()); 403 border_widget_->GetWindowBoundsInScreen().OffsetFromOrigin());
404 return client_bounds; 404 return client_bounds;
405 } 405 }
406 #endif 406 #endif
407 407
408 } // namespace views 408 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/bubble/bubble_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698