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

Unified Diff: chrome/browser/ui/views/translate/translate_bubble_view.h

Issue 1923143003: Implement the 2016Q2 Translate UI designe spec out in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test breakage Created 4 years, 8 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/translate/translate_bubble_view.h
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.h b/chrome/browser/ui/views/translate/translate_bubble_view.h
index d69f4ba113b7b11a0d65835f6a9d78b938ac09ea..f36edb4f4896a7d3fb94a5af7fe5b7094375167f 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.h
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.h
@@ -20,16 +20,22 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/controls/link_listener.h"
+#include "ui/views/controls/styled_label_listener.h"
class Browser;
class PrefService;
+namespace gfx {
+class Range;
+}
+
namespace views {
class Checkbox;
class GridLayout;
class LabelButton;
class Link;
class View;
+class StyledLabel;
}
namespace ui {
@@ -40,6 +46,7 @@ class TranslateBubbleView : public LocationBarBubbleDelegateView,
public views::ButtonListener,
public views::ComboboxListener,
public views::LinkListener,
+ public views::StyledLabelListener,
public content::WebContentsObserver {
public:
// Commands shown in the action-style combobox. The value corresponds to the
@@ -96,6 +103,12 @@ class TranslateBubbleView : public LocationBarBubbleDelegateView,
// Returns the current view state.
TranslateBubbleModel::ViewState GetViewState() const;
+ bool ShouldShowCloseButton() const override;
+
+ // views::StyledLabelListener method.
+ void StyledLabelLinkClicked(views::StyledLabel* label,
+ const gfx::Range& range,
+ int event_flags) override;
private:
enum LinkID {
LINK_ID_ADVANCED,
@@ -211,8 +224,20 @@ class TranslateBubbleView : public LocationBarBubbleDelegateView,
// Whether the window is an incognito window.
const bool is_in_incognito_window_;
- // Whether the translation is acutually executed.
- bool translate_executed_;
+ // Whether one of denial buttons is clicked.
+ bool denial_button_clicked_;
+
+ // Use 2016 Q2 Translate UI
+ bool use_2016_q2_ui_;
+
+ // Show icon inside dialogbox or not
+ bool show_icon_;
+
+ // Show Always translate checkbox inside dialogbox or not
+ bool show_always_checkbox_;
+
+ // Use Blue button or not
+ bool use_blue_button_;
DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView);
};

Powered by Google App Engine
This is Rietveld 408576698