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

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

Issue 3201003: Fixed error message bubbles according to the latest mocks (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Comments resolved Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/login_screen.cc ('k') | 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 310d1bc5d770cd9394876f6bffb498ce4767ca0b..f29ecf8003fbca277ed3bb9b497bcb0cf726e0cd 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/controls/link.h"
#include "views/view.h"
#include "views/widget/widget_gtk.h"
@@ -21,9 +22,16 @@ class Label;
namespace chromeos {
+class MessageBubbleDelegate : public InfoBubbleDelegate {
+ public:
+ // Called when the user clicked on help link.
+ virtual void OnHelpLinkActivated() = 0;
+};
+
// MessageBubble is used to show error and info messages on OOBE screens.
class MessageBubble : public InfoBubble,
- public views::ButtonListener {
+ public views::ButtonListener,
+ public views::LinkController {
public:
// Create and show bubble. position_relative_to must be in screen coordinates.
static MessageBubble* Show(views::Widget* parent,
@@ -31,7 +39,8 @@ class MessageBubble : public InfoBubble,
BubbleBorder::ArrowLocation arrow_location,
SkBitmap* image,
const std::wstring& text,
- InfoBubbleDelegate* delegate);
+ const std::wstring& help,
+ MessageBubbleDelegate* delegate);
// Create and show bubble which does not grab pointer. This creates
// a TYPE_CHILD WidgetGtk and |position_relative_to| must be in parent's
@@ -41,7 +50,8 @@ class MessageBubble : public InfoBubble,
BubbleBorder::ArrowLocation arrow_location,
SkBitmap* image,
const std::wstring& text,
- InfoBubbleDelegate* delegate);
+ const std::wstring& help,
+ MessageBubbleDelegate* delegate);
// Overridden from WidgetGtk.
virtual void Close();
@@ -53,23 +63,32 @@ class MessageBubble : public InfoBubble,
}
protected:
- // views::ButtonListener implmenets.
+ // Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
const views::Event& event);
+ // Overridden from views::LinkController:
+ virtual void LinkActivated(views::Link* source, int event_flags);
+
// Overridden from WidgetGtk.
virtual void IsActiveChanged();
virtual void DoGrab();
private:
MessageBubble(views::WidgetGtk::Type type,
- views::Widget* parent, SkBitmap* image,
- const std::wstring& text, bool grab_enabled);
+ views::Widget* parent,
+ SkBitmap* image,
+ const std::wstring& text,
+ const std::wstring& help,
+ bool grab_enabled,
+ MessageBubbleDelegate* delegate);
views::Widget* parent_;
views::ImageView* icon_;
views::Label* text_;
views::ImageButton* close_button_;
+ views::Link* help_link_;
+ MessageBubbleDelegate* message_delegate_;
bool grab_enabled_;
DISALLOW_COPY_AND_ASSIGN(MessageBubble);
« no previous file with comments | « chrome/browser/chromeos/login/login_screen.cc ('k') | chrome/browser/chromeos/login/message_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698