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

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

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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fbac465dae37def6cc4c4704ad3e8d12321fdb4d..5ac8ac70433c12a28cbc4ccdb112c667f087d6c9 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"
@@ -27,6 +28,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"
@@ -369,6 +371,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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698