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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 1221193009: [Docking] Persists docked state for tab-less browser windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Docking] Persists docked state for tab-less browser windows (nits) Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_frame_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 scoped_ptr<DictionaryPrefUpdate> pref_update = 154 scoped_ptr<DictionaryPrefUpdate> pref_update =
155 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); 155 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs);
156 base::DictionaryValue* window_preferences = pref_update->Get(); 156 base::DictionaryValue* window_preferences = pref_update->Get();
157 window_preferences->SetInteger("left", bounds.x()); 157 window_preferences->SetInteger("left", bounds.x());
158 window_preferences->SetInteger("top", bounds.y()); 158 window_preferences->SetInteger("top", bounds.y());
159 window_preferences->SetInteger("right", bounds.right()); 159 window_preferences->SetInteger("right", bounds.right());
160 window_preferences->SetInteger("bottom", bounds.bottom()); 160 window_preferences->SetInteger("bottom", bounds.bottom());
161 window_preferences->SetBoolean("maximized", 161 window_preferences->SetBoolean("maximized",
162 show_state == ui::SHOW_STATE_MAXIMIZED); 162 show_state == ui::SHOW_STATE_MAXIMIZED);
163 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED);
163 gfx::Rect work_area(gfx::Screen::GetScreenFor(window->GetNativeView())-> 164 gfx::Rect work_area(gfx::Screen::GetScreenFor(window->GetNativeView())->
164 GetDisplayNearestWindow(window->GetNativeView()).work_area()); 165 GetDisplayNearestWindow(window->GetNativeView()).work_area());
165 window_preferences->SetInteger("work_area_left", work_area.x()); 166 window_preferences->SetInteger("work_area_left", work_area.x());
166 window_preferences->SetInteger("work_area_top", work_area.y()); 167 window_preferences->SetInteger("work_area_top", work_area.y());
167 window_preferences->SetInteger("work_area_right", work_area.right()); 168 window_preferences->SetInteger("work_area_right", work_area.right());
168 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); 169 window_preferences->SetInteger("work_area_bottom", work_area.bottom());
169 } 170 }
170 171
171 bool ChromeViewsDelegate::GetSavedWindowPlacement( 172 bool ChromeViewsDelegate::GetSavedWindowPlacement(
172 const views::Widget* widget, 173 const views::Widget* widget,
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 return content::BrowserThread::GetBlockingPool(); 435 return content::BrowserThread::GetBlockingPool();
435 } 436 }
436 437
437 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) 438 #if !defined(USE_AURA) && !defined(USE_CHROMEOS)
438 views::Widget::InitParams::WindowOpacity 439 views::Widget::InitParams::WindowOpacity
439 ChromeViewsDelegate::GetOpacityForInitParams( 440 ChromeViewsDelegate::GetOpacityForInitParams(
440 const views::Widget::InitParams& params) { 441 const views::Widget::InitParams& params) {
441 return views::Widget::InitParams::OPAQUE_WINDOW; 442 return views::Widget::InitParams::OPAQUE_WINDOW;
442 } 443 }
443 #endif 444 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_frame_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698