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

Unified Diff: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.h

Issue 2617543002: Create Desktop to iOS Promotion skeleton. (Closed)
Patch Set: Created 3 years, 11 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/desktop_ios_promotion/desktop_ios_promotion_view.h
diff --git a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.h b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f9db20974638d1830a0de7f42df81cc36581deb
--- /dev/null
+++ b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.h
@@ -0,0 +1,44 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_VIEW_H_
+
+#include "base/macros.h"
+#include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_model.h"
+#include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/view.h"
+
+namespace views {
+class Link;
+}
+
+// The DesktopIOSPromotionView has the basic layout for the
+// desktop to ios promotion view.
+// This view will always be created as a subview of an existing
+// bubble (ie. Password Bubble, Bookmark Bubble).
+class DesktopIOSPromotionView : public views::View,
sky 2017/01/04 20:52:37 Why do you need to subclass View here?
+ public views::ButtonListener {
+ public:
+ explicit DesktopIOSPromotionView(desktop_ios_promotion::PromotionEntryPoint);
+
sky 2017/01/04 20:52:37 Don't inline destructor.
+ private:
+ int GetDesiredBubbleWidth(
+ desktop_ios_promotion::PromotionEntryPoint entry_point);
+ base::string16 GetPromoBubbleText(
+ desktop_ios_promotion::PromotionEntryPoint entry_point);
+
+ // ButtonListener:
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ views::Button* send_sms_button_ = nullptr;
+ views::Button* no_button_ = nullptr;
+ views::Link* learn_more_link_ = nullptr;
+ DesktopIOSPromotionModel* model_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopIOSPromotionView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698