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

Unified Diff: chrome/browser/chromeos/login/message_bubble.h

Issue 2682004: MessageBubble which does not require separate window and does not grab input on mouse press event. (Closed)
Patch Set: moved HandleGrabBroke to protected section Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/message_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/message_bubble.h
diff --git a/chrome/browser/chromeos/login/message_bubble.h b/chrome/browser/chromeos/login/message_bubble.h
index 82f9cbe15dac0bd3e81c5070a326a16472442cd1..9bc4464dbfd0b38b610858626d8a55d8fb05e69a 100644
--- a/chrome/browser/chromeos/login/message_bubble.h
+++ b/chrome/browser/chromeos/login/message_bubble.h
@@ -8,6 +8,7 @@
#include "chrome/browser/views/info_bubble.h"
#include "views/controls/button/button.h"
#include "views/view.h"
+#include "views/widget/widget_gtk.h"
class SkBitmap;
@@ -31,23 +32,39 @@ class MessageBubble : public InfoBubble,
const std::wstring& text,
InfoBubbleDelegate* delegate);
- // Overridden from WidgetWin
+ // Create and show bubble which does not grab pointer. This creates
+ // a TYPE_CHILD WidgetGtk and |position_relative_to| must be in parent's
+ // coordinates.
+ static MessageBubble* ShowNoGrab(views::Widget* parent,
+ const gfx::Rect& position_relative_to,
+ BubbleBorder::ArrowLocation arrow_location,
+ SkBitmap* image,
+ const std::wstring& text,
+ InfoBubbleDelegate* delegate);
+
+ // Overridden from WidgetGtk.
virtual void Close();
protected:
+
+ // views::ButtonListener implmenets.
virtual void ButtonPressed(views::Button* sender,
const views::Event& event);
+ // Overridden from WidgetGtk.
virtual void IsActiveChanged();
+ virtual void DoGrab();
private:
- MessageBubble(views::Widget* parent, SkBitmap* image,
- const std::wstring& text);
+ MessageBubble(views::WidgetGtk::Type type,
+ views::Widget* parent, SkBitmap* image,
+ const std::wstring& text, bool grab_enabled);
views::Widget* parent_;
views::ImageView* icon_;
views::Label* text_;
views::ImageButton* close_button_;
+ bool grab_enabled_;
DISALLOW_COPY_AND_ASSIGN(MessageBubble);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/message_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698