OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "chrome/browser/download/download_util.h" | 53 #include "chrome/browser/download/download_util.h" |
54 #include "chrome/browser/extensions/browser_extension_window_controller.h" | 54 #include "chrome/browser/extensions/browser_extension_window_controller.h" |
55 #include "chrome/browser/extensions/extension_prefs.h" | 55 #include "chrome/browser/extensions/extension_prefs.h" |
56 #include "chrome/browser/extensions/extension_service.h" | 56 #include "chrome/browser/extensions/extension_service.h" |
57 #include "chrome/browser/extensions/extension_system.h" | 57 #include "chrome/browser/extensions/extension_system.h" |
58 #include "chrome/browser/extensions/tab_helper.h" | 58 #include "chrome/browser/extensions/tab_helper.h" |
59 #include "chrome/browser/favicon/favicon_tab_helper.h" | 59 #include "chrome/browser/favicon/favicon_tab_helper.h" |
60 #include "chrome/browser/file_select_helper.h" | 60 #include "chrome/browser/file_select_helper.h" |
61 #include "chrome/browser/first_run/first_run.h" | 61 #include "chrome/browser/first_run/first_run.h" |
62 #include "chrome/browser/google/google_url_tracker.h" | 62 #include "chrome/browser/google/google_url_tracker.h" |
63 #include "chrome/browser/intents/device_attached_intent_source.h" | |
64 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" | 63 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" |
65 #include "chrome/browser/intents/web_intents_reporting.h" | 64 #include "chrome/browser/intents/web_intents_reporting.h" |
66 #include "chrome/browser/intents/web_intents_util.h" | 65 #include "chrome/browser/intents/web_intents_util.h" |
67 #include "chrome/browser/lifetime/application_lifetime.h" | 66 #include "chrome/browser/lifetime/application_lifetime.h" |
68 #include "chrome/browser/media/media_stream_devices_controller.h" | 67 #include "chrome/browser/media/media_stream_devices_controller.h" |
69 #include "chrome/browser/net/url_fixer_upper.h" | 68 #include "chrome/browser/net/url_fixer_upper.h" |
70 #include "chrome/browser/notifications/notification_ui_manager.h" | 69 #include "chrome/browser/notifications/notification_ui_manager.h" |
71 #include "chrome/browser/pepper_broker_infobar_delegate.h" | 70 #include "chrome/browser/pepper_broker_infobar_delegate.h" |
72 #include "chrome/browser/platform_util.h" | 71 #include "chrome/browser/platform_util.h" |
73 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 72 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 BrowserList::AddBrowser(this); | 418 BrowserList::AddBrowser(this); |
420 | 419 |
421 // NOTE: These prefs all need to be explicitly destroyed in the destructor | 420 // NOTE: These prefs all need to be explicitly destroyed in the destructor |
422 // or you'll get a nasty surprise when you run the incognito tests. | 421 // or you'll get a nasty surprise when you run the incognito tests. |
423 encoding_auto_detect_.Init(prefs::kWebKitUsesUniversalDetector, | 422 encoding_auto_detect_.Init(prefs::kWebKitUsesUniversalDetector, |
424 profile_->GetPrefs()); | 423 profile_->GetPrefs()); |
425 | 424 |
426 if (is_type_tabbed()) | 425 if (is_type_tabbed()) |
427 instant_controller_.reset(new chrome::BrowserInstantController(this)); | 426 instant_controller_.reset(new chrome::BrowserInstantController(this)); |
428 | 427 |
429 #if 0 | |
430 // Disabled for M22. See http://crbug.com/144326. | |
431 device_attached_intent_source_.reset( | |
432 new DeviceAttachedIntentSource(this, (this))); | |
433 #endif | |
434 | |
435 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_INIT); | 428 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_INIT); |
436 | 429 |
437 FilePath profile_path = profile_->GetPath(); | 430 FilePath profile_path = profile_->GetPath(); |
438 ProfileMetrics::LogProfileLaunch(profile_path); | 431 ProfileMetrics::LogProfileLaunch(profile_path); |
439 | 432 |
440 window_ = params.window ? params.window : CreateBrowserWindow(this); | 433 window_ = params.window ? params.window : CreateBrowserWindow(this); |
441 | 434 |
442 // TODO(beng): move to BrowserFrameWin. | 435 // TODO(beng): move to BrowserFrameWin. |
443 #if defined(OS_WIN) && !defined(USE_AURA) | 436 #if defined(OS_WIN) && !defined(USE_AURA) |
444 // Set the app user model id for this application to that of the application | 437 // Set the app user model id for this application to that of the application |
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 if (contents && !allow_js_access) { | 2371 if (contents && !allow_js_access) { |
2379 contents->web_contents()->GetController().LoadURL( | 2372 contents->web_contents()->GetController().LoadURL( |
2380 target_url, | 2373 target_url, |
2381 content::Referrer(), | 2374 content::Referrer(), |
2382 content::PAGE_TRANSITION_LINK, | 2375 content::PAGE_TRANSITION_LINK, |
2383 std::string()); // No extra headers. | 2376 std::string()); // No extra headers. |
2384 } | 2377 } |
2385 | 2378 |
2386 return contents != NULL; | 2379 return contents != NULL; |
2387 } | 2380 } |
OLD | NEW |