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

Unified Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 1169823005: Add sidebar views implementation using ExtensionSystem SidebarManager Base URL: https://chromium.googlesource.com/chromium/src.git@patch-a
Patch Set: Rebased patch set to 1168383002/#ps220001 Created 5 years, 3 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/frame/browser_view.h
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index 5d2032b860b2efca8a6bcdcf8474bd614f0ab474..b0d1057028afc13ad3bc6b4f0dffeb5060340eb7 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -30,6 +30,7 @@
#include "ui/base/models/simple_menu_model.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/single_split_view_listener.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_observer.h"
@@ -68,6 +69,7 @@ class Extension;
namespace views {
class AccessiblePaneView;
class ExternalFocusTracker;
+class SingleSplitView;
class WebView;
}
@@ -86,6 +88,7 @@ class BrowserView : public BrowserWindow,
public InfoBarContainerDelegate,
public LoadCompleteListener::Delegate,
public OmniboxPopupModelObserver,
+ public views::SingleSplitViewListener,
public ExclusiveAccessContext,
public ExclusiveAccessBubbleViewsContext {
public:
@@ -100,7 +103,7 @@ class BrowserView : public BrowserWindow,
void set_frame(BrowserFrame* frame) { frame_ = frame; }
BrowserFrame* frame() const { return frame_; }
-
+ int GetSidebarWidth() const;
// Returns a pointer to the BrowserView* interface implementation (an
// instance of this object, typically) for a given native window, or null if
// there is no such association.
@@ -456,6 +459,10 @@ class BrowserView : public BrowserWindow,
views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }
views::WebView* GetDevToolsWebViewForTest() { return devtools_web_view_; }
+ // Handle Sidebar
+ void ShowSidebar(content::WebContents* sidebar_contents);
+ void HideSidebar();
+
private:
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
@@ -520,7 +527,7 @@ class BrowserView : public BrowserWindow,
// |contents|. |contents| can be null. In this case, all optional UI will be
// removed.
void UpdateUIForContents(content::WebContents* contents);
-
+ bool SplitHandleMoved(views::SingleSplitView* sender) override;
// Invoked to update the necessary things when our fullscreen state changes
// to |fullscreen|. On Windows this is invoked immediately when we toggle the
// full screen state. On Linux changing the fullscreen state is async, so we
@@ -549,6 +556,7 @@ class BrowserView : public BrowserWindow,
// Initialize the hung plugin detector.
void InitHangMonitor();
+ void UpdateSidebarForContents(content::WebContents* sidebar_contents);
// Possibly records a user metrics action corresponding to the passed-in
// accelerator. Only implemented for Chrome OS, where we're interested in
@@ -691,6 +699,12 @@ class BrowserView : public BrowserWindow,
views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
+ views::WebView* sidebar_web_view_;
+
+ views::View* sidebar_container_;
+
+ views::SingleSplitView* sidebar_split_;
+
// Used to measure the loading spinner animation rate.
base::TimeTicks last_animation_time_;

Powered by Google App Engine
This is Rietveld 408576698