| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/chromeos/main_menu.h" | 5 #include "chrome/browser/chromeos/main_menu.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/gfx/insets.h" | 10 #include "app/gfx/insets.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 gtk_widget_set_size_request(popup_->GetNativeView(), | 238 gtk_widget_set_size_request(popup_->GetNativeView(), |
| 239 new_bounds.width(), new_bounds.height()); | 239 new_bounds.width(), new_bounds.height()); |
| 240 gfx::Size rwhv_size = CalculateRWHVSize(new_bounds.size()); | 240 gfx::Size rwhv_size = CalculateRWHVSize(new_bounds.size()); |
| 241 popup_->PositionChild(rwhv_->GetNativeView(), kRendererX, kRendererY, | 241 popup_->PositionChild(rwhv_->GetNativeView(), kRendererX, kRendererY, |
| 242 rwhv_size.width(), rwhv_size.height()); | 242 rwhv_size.width(), rwhv_size.height()); |
| 243 popup_->SetBounds(new_bounds); | 243 popup_->SetBounds(new_bounds); |
| 244 rwhv_->SetSize(rwhv_size); | 244 rwhv_->SetSize(rwhv_size); |
| 245 } | 245 } |
| 246 | 246 |
| 247 RendererPreferences MainMenu::GetRendererPrefs(Profile* profile) const { | 247 RendererPreferences MainMenu::GetRendererPrefs(Profile* profile) const { |
| 248 return renderer_preferences_util::GetInitedRendererPreferences(profile); | 248 RendererPreferences preferences; |
| 249 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile); |
| 250 return preferences; |
| 249 } | 251 } |
| 250 | 252 |
| 251 void MainMenu::CreateNewWindow(int route_id) { | 253 void MainMenu::CreateNewWindow(int route_id) { |
| 252 if (pending_contents_.get()) { | 254 if (pending_contents_.get()) { |
| 253 NOTREACHED(); | 255 NOTREACHED(); |
| 254 return; | 256 return; |
| 255 } | 257 } |
| 256 | 258 |
| 257 helper_.CreateNewWindow(route_id, browser_->profile(), site_instance_, | 259 helper_.CreateNewWindow(route_id, browser_->profile(), site_instance_, |
| 258 DOMUIFactory::GetDOMUIType(GURL(GetMenuURL())), | 260 DOMUIFactory::GetDOMUIType(GURL(GetMenuURL())), |
| (...skipping 30 matching lines...) Expand all Loading... |
| 289 // LoadTask ------------------------------------------------------------------- | 291 // LoadTask ------------------------------------------------------------------- |
| 290 | 292 |
| 291 void MainMenu::LoadTask::Run() { | 293 void MainMenu::LoadTask::Run() { |
| 292 if (BrowserList::begin() == BrowserList::end()) | 294 if (BrowserList::begin() == BrowserList::end()) |
| 293 return; // No browser are around. Generally only happens during testing. | 295 return; // No browser are around. Generally only happens during testing. |
| 294 | 296 |
| 295 MainMenu::Get(); | 297 MainMenu::Get(); |
| 296 } | 298 } |
| 297 | 299 |
| 298 } // namespace chromeos | 300 } // namespace chromeos |
| OLD | NEW |