OLD | NEW |
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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 ALLOW_THIS_IN_INITIALIZER_LIST( | 325 ALLOW_THIS_IN_INITIALIZER_LIST( |
326 synced_window_delegate_( | 326 synced_window_delegate_( |
327 new BrowserSyncedWindowDelegate(this))), | 327 new BrowserSyncedWindowDelegate(this))), |
328 bookmark_bar_state_(BookmarkBar::HIDDEN), | 328 bookmark_bar_state_(BookmarkBar::HIDDEN), |
329 device_attached_intent_source_(this, this), | 329 device_attached_intent_source_(this, this), |
330 ALLOW_THIS_IN_INITIALIZER_LIST( | 330 ALLOW_THIS_IN_INITIALIZER_LIST( |
331 command_controller_(new chrome::BrowserCommandController(this))), | 331 command_controller_(new chrome::BrowserCommandController(this))), |
332 window_has_shown_(false) { | 332 window_has_shown_(false) { |
333 tab_strip_model_->AddObserver(this); | 333 tab_strip_model_->AddObserver(this); |
334 | 334 |
| 335 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 336 switches::kEnableTabMRUSwitch)) { |
| 337 mru_tab_controller_.reset(new MRUTabController(tab_strip_model_.get())); |
| 338 } |
335 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get())); | 339 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get())); |
336 search_model_.reset(new chrome::search::SearchModel(NULL)); | 340 search_model_.reset(new chrome::search::SearchModel(NULL)); |
337 search_delegate_.reset( | 341 search_delegate_.reset( |
338 new chrome::search::SearchDelegate(search_model_.get())); | 342 new chrome::search::SearchDelegate(search_model_.get())); |
339 | 343 |
340 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, | 344 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, |
341 content::NotificationService::AllSources()); | 345 content::NotificationService::AllSources()); |
342 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 346 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
343 content::Source<Profile>(profile_->GetOriginalProfile())); | 347 content::Source<Profile>(profile_->GetOriginalProfile())); |
344 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 348 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2275 if (contents && !allow_js_access) { | 2279 if (contents && !allow_js_access) { |
2276 contents->web_contents()->GetController().LoadURL( | 2280 contents->web_contents()->GetController().LoadURL( |
2277 target_url, | 2281 target_url, |
2278 content::Referrer(), | 2282 content::Referrer(), |
2279 content::PAGE_TRANSITION_LINK, | 2283 content::PAGE_TRANSITION_LINK, |
2280 std::string()); // No extra headers. | 2284 std::string()); // No extra headers. |
2281 } | 2285 } |
2282 | 2286 |
2283 return contents != NULL; | 2287 return contents != NULL; |
2284 } | 2288 } |
OLD | NEW |