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

Unified Diff: chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h

Issue 907473002: Polish UI of bookmark app creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extract GetTrimmedTitle Created 5 years, 10 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
Index: chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h
diff --git a/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h b/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h
index b3f04b6018b1a768b5d8c781b0b09375b67a96be..621319aad0d5646d6ebb608a7bafbab6d7c46ff3 100644
--- a/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h
+++ b/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h
@@ -11,6 +11,7 @@
#include "chrome/common/web_application_info.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/textfield/textfield_controller.h"
namespace gfx {
class ImageSkia;
@@ -28,7 +29,8 @@ class Textfield;
// create a bookmark app with. Don't create a BookmarkAppBubbleView directly,
// instead use the static ShowBubble method.
class BookmarkAppBubbleView : public views::BubbleDelegateView,
- public views::ButtonListener {
+ public views::ButtonListener,
+ public views::TextfieldController {
public:
~BookmarkAppBubbleView() override;
@@ -59,9 +61,19 @@ class BookmarkAppBubbleView : public views::BubbleDelegateView,
// Closes the bubble or opens the edit dialog.
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+ // Overidden from views::TextfieldController:
Lei Zhang 2015/02/06 22:41:28 Overridden
benwells 2015/02/07 03:17:38 Done.
+ void ContentsChanged(views::Textfield* sender,
+ const base::string16& new_contents) override;
+
// Handle the message when the user presses a button.
void HandleButtonPressed(views::Button* sender);
+ // Update the state of the Add button.
+ void UpdateAddButtonState();
+
+ // Get the trimmed contents of the title text field.
+ base::string16 GetTrimmedTitle();
+
// The WebApplicationInfo that the user is editing.
WebApplicationInfo web_app_info_;

Powered by Google App Engine
This is Rietveld 408576698