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

Unified Diff: mash/browser/debug_view.h

Issue 2039613002: Add a debug view to the browser that allows various navigation features to be used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « mash/browser/browser.cc ('k') | mash/browser/debug_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/browser/debug_view.h
diff --git a/mash/browser/debug_view.h b/mash/browser/debug_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7e733b1ba7f1d32f262bc15192c807875ded254
--- /dev/null
+++ b/mash/browser/debug_view.h
@@ -0,0 +1,51 @@
+// Copyright 2016 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 MASH_BROWSER_DEBUG_VIEW_H_
+#define MASH_BROWSER_DEBUG_VIEW_H_
+
+#include "services/navigation/public/interfaces/view.mojom.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/view.h"
+
+namespace views {
+class Label;
+class LabelButton;
+class Textfield;
+} // namespace views
+
+namespace mash {
+namespace browser {
+
+// A panel that shows some controls for compelling the content area of the
+// browser to do specific things.
+class DebugView : public views::View,
+ public views::ButtonListener {
+ public:
+ DebugView();
+ ~DebugView() override;
+ DebugView(const DebugView&) = delete;
+ void operator=(const DebugView&) = delete;
+
+ void set_view(navigation::mojom::View* view) { view_ = view; }
+
+ gfx::Size GetPreferredSize() const override;
+
+ private:
+ void OnPaint(gfx::Canvas* canvas) override;
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ navigation::mojom::View* view_ = nullptr;
+
+ views::View* interstitial_container_;
+ views::Label* interstitial_label_;
+ views::LabelButton* interstitial_show_;
+ views::LabelButton* interstitial_hide_;
+ views::Textfield* interstitial_content_;
+};
+
+} // namespace browser
+} // namespace mash
+
+#endif // MASH_BROWSER_DEBUG_VIEW_H_
« no previous file with comments | « mash/browser/browser.cc ('k') | mash/browser/debug_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698