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

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: Feedback 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..688cf05829fcaa9836707ecaf48dc1d175d38bd5 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;
+ // Overridden from views::TextfieldController:
+ 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_;
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.cc ('k') | chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698