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

Unified Diff: views/bubble/bubble_delegate.h

Issue 8368006: Support Windows native textfield, combobox, etc. in new bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore Widget return; same as Patch Set 9 with updated CreateBubble comment. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/bubble/bubble_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/bubble/bubble_delegate.h
diff --git a/views/bubble/bubble_delegate.h b/views/bubble/bubble_delegate.h
index 929f61958c57cd661867b2017355e5b9744ffe19..a5f6ab9993df841024f5f3c7338c098bf20af887 100644
--- a/views/bubble/bubble_delegate.h
+++ b/views/bubble/bubble_delegate.h
@@ -6,6 +6,7 @@
#define VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
#pragma once
+#include "base/gtest_prod_util.h"
#include "ui/base/animation/animation_delegate.h"
#include "views/bubble/bubble_border.h"
#include "views/widget/widget_delegate.h"
@@ -17,7 +18,6 @@ class SlideAnimation;
namespace views {
class BubbleFrameView;
-class BubbleView;
// BubbleDelegateView creates frame and client views for bubble Widgets.
// BubbleDelegateView itself is the client's contents view.
@@ -32,14 +32,13 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
const SkColor& color);
virtual ~BubbleDelegateView();
- // Create a bubble Widget from the argument BubbleDelegateView.
+ // Create and initialize the bubble Widget(s) with proper bounds.
static Widget* CreateBubble(BubbleDelegateView* bubble_delegate,
Widget* parent_widget);
// WidgetDelegate overrides:
virtual View* GetInitiallyFocusedView() OVERRIDE;
virtual View* GetContentsView() OVERRIDE;
- virtual ClientView* CreateClientView(Widget* widget) OVERRIDE;
virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
bool close_on_esc() const { return close_on_esc_; }
@@ -54,6 +53,9 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
// Get the color used for the background and border.
virtual SkColor GetColor() const;
+ // Show the bubble's widget (and |border_widget_| on Windows).
+ void Show();
+
// Fade the bubble in or out via Widget transparency.
// Fade in calls Widget::Show; fade out calls Widget::Close upon completion.
void StartFade(bool fade_in);
@@ -70,16 +72,26 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
virtual void Init();
private:
+ FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewBasicTest, NonClientHitTest);
+ FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate);
+
// ui::AnimationDelegate overrides:
virtual void AnimationEnded(const ui::Animation* animation);
virtual void AnimationProgressed(const ui::Animation* animation);
- const BubbleView* GetBubbleView() const;
- const BubbleFrameView* GetBubbleFrameView() const;
+ BubbleFrameView* GetBubbleFrameView() const;
// Get bubble bounds from the anchor point and client view's preferred size.
gfx::Rect GetBubbleBounds();
+#if defined(OS_WIN) && !defined(USE_AURA)
+ // Initialize the border widget needed for Windows native control hosting.
+ void InitializeBorderWidget(Widget* parent_widget);
+
+ // Get bounds for the Windows-only widget that hosts the bubble's contents.
+ gfx::Rect GetBubbleClientBounds() const;
+#endif
+
// Fade animation for bubble.
scoped_ptr<ui::SlideAnimation> fade_animation_;
@@ -97,6 +109,11 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
// Original opacity of the bubble.
int original_opacity_;
+
+ // The widget hosting the border for this bubble (non-Aura Windows only).
+ Widget* border_widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView);
};
} // namespace views
« no previous file with comments | « no previous file | views/bubble/bubble_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698