Index: chrome/browser/ui/views/frame/browser_frame.cc |
diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc |
index 32d0e94a9bf414369845ed536c5107c34fb09698..5cb7472ec0d1704cc020e3627fd139b8349cf2c4 100644 |
--- a/chrome/browser/ui/views/frame/browser_frame.cc |
+++ b/chrome/browser/ui/views/frame/browser_frame.cc |
@@ -6,6 +6,7 @@ |
#include <utility> |
+#include "base/command_line.h" |
#include "base/debug/leak_annotations.h" |
#include "base/i18n/rtl.h" |
#include "build/build_config.h" |
@@ -23,6 +24,7 @@ |
#include "chrome/browser/ui/views/frame/native_browser_frame_factory.h" |
#include "chrome/browser/ui/views/frame/system_menu_model_builder.h" |
#include "chrome/browser/ui/views/frame/top_container_view.h" |
+#include "chrome/common/chrome_switches.h" |
#include "ui/base/hit_test.h" |
#include "ui/events/event_handler.h" |
#include "ui/gfx/font_list.h" |
@@ -79,6 +81,15 @@ void BrowserFrame::InitBrowserFrame() { |
chrome::GetSavedWindowBoundsAndShowState(browser_view_->browser(), |
¶ms.bounds, |
¶ms.show_state); |
+ |
+ params.workspace = browser_view_->browser()->initial_workspace(); |
+ const base::CommandLine& parsed_command_line = |
+ *base::CommandLine::ForCurrentProcess(); |
+ |
+ if (parsed_command_line.HasSwitch(switches::kWindowWorkspace)) { |
+ params.workspace = |
+ parsed_command_line.GetSwitchValueASCII(switches::kWindowWorkspace); |
+ } |
} |
Init(params); |
@@ -209,6 +220,11 @@ void BrowserFrame::OnNativeWidgetActivationChanged(bool active) { |
Widget::OnNativeWidgetActivationChanged(active); |
} |
+void BrowserFrame::OnNativeWidgetWorkspaceChanged() { |
+ chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); |
+ Widget::OnNativeWidgetWorkspaceChanged(); |
+} |
+ |
void BrowserFrame::ShowContextMenuForView(views::View* source, |
const gfx::Point& p, |
ui::MenuSourceType source_type) { |