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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 1152613003: Implement sidebar support for extension action popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move SidebarManager to ExtensionSystem and remove notifications Created 5 years, 7 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_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index 9bf394bf05200848977f37d0863045b6b429dbf8..b762a02948f19715c18d17fee2bcd1749d3aa32f 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/search/search_model.h"
+#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
#include "chrome/browser/ui/views/download/download_shelf_view.h"
#include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
@@ -26,6 +27,7 @@
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/scrollbar_size.h"
+#include "ui/views/controls/single_split_view.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/client_view.h"
@@ -366,6 +368,16 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
latest_dialog_bounds_ = dialog_bounds;
dialog_host_->NotifyPositionRequiresUpdate();
}
+
+ views::SingleSplitView* ssplitview =
+ (views::SingleSplitView*)contents_container_;
+ views::View* sidebar_web_view =
+ browser_view_->GetViewByID(VIEW_ID_SIDE_BAR_VIEW);
+ if (ssplitview && sidebar_web_view && sidebar_web_view->visible()) {
+ int width = (contents_container_->width() - ssplitview->divider_offset());
+ sidebar_web_view->SetBoundsRect(
+ gfx::Rect(0, 0, width, contents_container_->height()));
+ }
}
// Return the preferred size which is the size required to give each

Powered by Google App Engine
This is Rietveld 408576698