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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 ALLOW_THIS_IN_INITIALIZER_LIST( | 379 ALLOW_THIS_IN_INITIALIZER_LIST( |
380 command_controller_(new chrome::BrowserCommandController(this))), | 380 command_controller_(new chrome::BrowserCommandController(this))), |
381 window_has_shown_(false) { | 381 window_has_shown_(false) { |
382 if (!app_name_.empty()) | 382 if (!app_name_.empty()) |
383 chrome::RegisterAppPrefs(app_name_, profile_); | 383 chrome::RegisterAppPrefs(app_name_, profile_); |
384 tab_strip_model_->AddObserver(this); | 384 tab_strip_model_->AddObserver(this); |
385 | 385 |
386 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get())); | 386 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get())); |
387 search_model_.reset(new chrome::search::SearchModel(NULL)); | 387 search_model_.reset(new chrome::search::SearchModel(NULL)); |
388 search_delegate_.reset( | 388 search_delegate_.reset( |
389 new chrome::search::SearchDelegate(search_model_.get())); | 389 new chrome::search::SearchDelegate(search_model_.get(), |
| 390 toolbar_model_.get())); |
390 | 391 |
391 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, | 392 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, |
392 content::NotificationService::AllSources()); | 393 content::NotificationService::AllSources()); |
393 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 394 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
394 content::Source<Profile>(profile_->GetOriginalProfile())); | 395 content::Source<Profile>(profile_->GetOriginalProfile())); |
395 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 396 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
396 content::Source<Profile>(profile_->GetOriginalProfile())); | 397 content::Source<Profile>(profile_->GetOriginalProfile())); |
397 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 398 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
398 content::Source<Profile>(profile_->GetOriginalProfile())); | 399 content::Source<Profile>(profile_->GetOriginalProfile())); |
399 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, | 400 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, |
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2308 if (contents && !allow_js_access) { | 2309 if (contents && !allow_js_access) { |
2309 contents->web_contents()->GetController().LoadURL( | 2310 contents->web_contents()->GetController().LoadURL( |
2310 target_url, | 2311 target_url, |
2311 content::Referrer(), | 2312 content::Referrer(), |
2312 content::PAGE_TRANSITION_LINK, | 2313 content::PAGE_TRANSITION_LINK, |
2313 std::string()); // No extra headers. | 2314 std::string()); // No extra headers. |
2314 } | 2315 } |
2315 | 2316 |
2316 return contents != NULL; | 2317 return contents != NULL; |
2317 } | 2318 } |
OLD | NEW |