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

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

Issue 10810027: IWYU and other random cleanup in chrome/browser/ui. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/extensions/browser_extension_window_controller.h" 52 #include "chrome/browser/extensions/browser_extension_window_controller.h"
53 #include "chrome/browser/extensions/default_apps_trial.h" 53 #include "chrome/browser/extensions/default_apps_trial.h"
54 #include "chrome/browser/extensions/extension_prefs.h" 54 #include "chrome/browser/extensions/extension_prefs.h"
55 #include "chrome/browser/extensions/extension_service.h" 55 #include "chrome/browser/extensions/extension_service.h"
56 #include "chrome/browser/extensions/tab_helper.h" 56 #include "chrome/browser/extensions/tab_helper.h"
57 #include "chrome/browser/favicon/favicon_tab_helper.h" 57 #include "chrome/browser/favicon/favicon_tab_helper.h"
58 #include "chrome/browser/file_select_helper.h" 58 #include "chrome/browser/file_select_helper.h"
59 #include "chrome/browser/first_run/first_run.h" 59 #include "chrome/browser/first_run/first_run.h"
60 #include "chrome/browser/google/google_url_tracker.h" 60 #include "chrome/browser/google/google_url_tracker.h"
61 #include "chrome/browser/infobars/infobar_tab_helper.h" 61 #include "chrome/browser/infobars/infobar_tab_helper.h"
62 #include "chrome/browser/intents/device_attached_intent_source.h"
62 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" 63 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
63 #include "chrome/browser/intents/web_intents_util.h" 64 #include "chrome/browser/intents/web_intents_util.h"
64 #include "chrome/browser/lifetime/application_lifetime.h" 65 #include "chrome/browser/lifetime/application_lifetime.h"
65 #include "chrome/browser/media/media_stream_devices_controller.h" 66 #include "chrome/browser/media/media_stream_devices_controller.h"
66 #include "chrome/browser/net/url_fixer_upper.h" 67 #include "chrome/browser/net/url_fixer_upper.h"
67 #include "chrome/browser/notifications/notification_ui_manager.h" 68 #include "chrome/browser/notifications/notification_ui_manager.h"
68 #include "chrome/browser/platform_util.h" 69 #include "chrome/browser/platform_util.h"
69 #include "chrome/browser/prefs/incognito_mode_prefs.h" 70 #include "chrome/browser/prefs/incognito_mode_prefs.h"
70 #include "chrome/browser/prefs/pref_service.h" 71 #include "chrome/browser/prefs/pref_service.h"
71 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" 72 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 ALLOW_THIS_IN_INITIALIZER_LIST( 320 ALLOW_THIS_IN_INITIALIZER_LIST(
320 toolbar_model_delegate_( 321 toolbar_model_delegate_(
321 new BrowserToolbarModelDelegate(this))), 322 new BrowserToolbarModelDelegate(this))),
322 ALLOW_THIS_IN_INITIALIZER_LIST( 323 ALLOW_THIS_IN_INITIALIZER_LIST(
323 tab_restore_service_delegate_( 324 tab_restore_service_delegate_(
324 new BrowserTabRestoreServiceDelegate(this))), 325 new BrowserTabRestoreServiceDelegate(this))),
325 ALLOW_THIS_IN_INITIALIZER_LIST( 326 ALLOW_THIS_IN_INITIALIZER_LIST(
326 synced_window_delegate_( 327 synced_window_delegate_(
327 new BrowserSyncedWindowDelegate(this))), 328 new BrowserSyncedWindowDelegate(this))),
328 bookmark_bar_state_(BookmarkBar::HIDDEN), 329 bookmark_bar_state_(BookmarkBar::HIDDEN),
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 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get())); 335 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get()));
336 search_model_.reset(new chrome::search::SearchModel(NULL)); 336 search_model_.reset(new chrome::search::SearchModel(NULL));
337 search_delegate_.reset( 337 search_delegate_.reset(
338 new chrome::search::SearchDelegate(search_model_.get())); 338 new chrome::search::SearchDelegate(search_model_.get()));
339 339
(...skipping 22 matching lines...) Expand all
362 profile_pref_registrar_.Add(prefs::kHomePage, this); 362 profile_pref_registrar_.Add(prefs::kHomePage, this);
363 363
364 BrowserList::AddBrowser(this); 364 BrowserList::AddBrowser(this);
365 365
366 // NOTE: These prefs all need to be explicitly destroyed in the destructor 366 // NOTE: These prefs all need to be explicitly destroyed in the destructor
367 // or you'll get a nasty surprise when you run the incognito tests. 367 // or you'll get a nasty surprise when you run the incognito tests.
368 encoding_auto_detect_.Init(prefs::kWebKitUsesUniversalDetector, 368 encoding_auto_detect_.Init(prefs::kWebKitUsesUniversalDetector,
369 profile_->GetPrefs(), NULL); 369 profile_->GetPrefs(), NULL);
370 370
371 instant_controller_.reset(new chrome::BrowserInstantController(this)); 371 instant_controller_.reset(new chrome::BrowserInstantController(this));
372 device_attached_intent_source_.reset(
373 new DeviceAttachedIntentSource(this, (this)));
372 374
373 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_INIT); 375 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_INIT);
374 376
375 FilePath profile_path = profile->GetPath(); 377 FilePath profile_path = profile->GetPath();
376 ProfileMetrics::LogProfileLaunch(profile_path); 378 ProfileMetrics::LogProfileLaunch(profile_path);
377 } 379 }
378 380
379 Browser::~Browser() { 381 Browser::~Browser() {
380 // The tab strip should not have any tabs at this point. 382 // The tab strip should not have any tabs at this point.
381 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers()) 383 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers())
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 if (contents && !allow_js_access) { 2277 if (contents && !allow_js_access) {
2276 contents->web_contents()->GetController().LoadURL( 2278 contents->web_contents()->GetController().LoadURL(
2277 target_url, 2279 target_url,
2278 content::Referrer(), 2280 content::Referrer(),
2279 content::PAGE_TRANSITION_LINK, 2281 content::PAGE_TRANSITION_LINK,
2280 std::string()); // No extra headers. 2282 std::string()); // No extra headers.
2281 } 2283 }
2282 2284
2283 return contents != NULL; 2285 return contents != NULL;
2284 } 2286 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698