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

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

Issue 11040055: Adds a FakeToolbarModel for use in testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: git try Created 8 years, 2 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #include "chrome/browser/ui/search/search_types.h" 128 #include "chrome/browser/ui/search/search_types.h"
129 #include "chrome/browser/ui/singleton_tabs.h" 129 #include "chrome/browser/ui/singleton_tabs.h"
130 #include "chrome/browser/ui/status_bubble.h" 130 #include "chrome/browser/ui/status_bubble.h"
131 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h" 131 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h"
132 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 132 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
133 #include "chrome/browser/ui/tab_contents/tab_contents.h" 133 #include "chrome/browser/ui/tab_contents/tab_contents.h"
134 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 134 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
135 #include "chrome/browser/ui/tabs/dock_info.h" 135 #include "chrome/browser/ui/tabs/dock_info.h"
136 #include "chrome/browser/ui/tabs/tab_menu_model.h" 136 #include "chrome/browser/ui/tabs/tab_menu_model.h"
137 #include "chrome/browser/ui/tabs/tab_strip_model.h" 137 #include "chrome/browser/ui/tabs/tab_strip_model.h"
138 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
138 #include "chrome/browser/ui/unload_controller.h" 139 #include "chrome/browser/ui/unload_controller.h"
139 #include "chrome/browser/ui/web_applications/web_app_ui.h" 140 #include "chrome/browser/ui/web_applications/web_app_ui.h"
140 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 141 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
141 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 142 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
142 #include "chrome/browser/ui/window_sizer/window_sizer.h" 143 #include "chrome/browser/ui/window_sizer/window_sizer.h"
143 #include "chrome/browser/upgrade_detector.h" 144 #include "chrome/browser/upgrade_detector.h"
144 #include "chrome/browser/web_applications/web_app.h" 145 #include "chrome/browser/web_applications/web_app.h"
145 #include "chrome/common/chrome_constants.h" 146 #include "chrome/common/chrome_constants.h"
146 #include "chrome/common/chrome_notification_types.h" 147 #include "chrome/common/chrome_notification_types.h"
147 #include "chrome/common/chrome_switches.h" 148 #include "chrome/common/chrome_switches.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 synced_window_delegate_( 358 synced_window_delegate_(
358 new BrowserSyncedWindowDelegate(this))), 359 new BrowserSyncedWindowDelegate(this))),
359 bookmark_bar_state_(BookmarkBar::HIDDEN), 360 bookmark_bar_state_(BookmarkBar::HIDDEN),
360 ALLOW_THIS_IN_INITIALIZER_LIST( 361 ALLOW_THIS_IN_INITIALIZER_LIST(
361 command_controller_(new chrome::BrowserCommandController(this))), 362 command_controller_(new chrome::BrowserCommandController(this))),
362 window_has_shown_(false) { 363 window_has_shown_(false) {
363 if (!app_name_.empty()) 364 if (!app_name_.empty())
364 chrome::RegisterAppPrefs(app_name_, profile_); 365 chrome::RegisterAppPrefs(app_name_, profile_);
365 tab_strip_model_->AddObserver(this); 366 tab_strip_model_->AddObserver(this);
366 367
367 toolbar_model_.reset(new ToolbarModel(toolbar_model_delegate_.get())); 368 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get()));
368 search_model_.reset(new chrome::search::SearchModel(NULL)); 369 search_model_.reset(new chrome::search::SearchModel(NULL));
369 search_delegate_.reset( 370 search_delegate_.reset(
370 new chrome::search::SearchDelegate(search_model_.get(), 371 new chrome::search::SearchDelegate(search_model_.get(),
371 toolbar_model_.get())); 372 toolbar_model_.get()));
372 373
373 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, 374 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
374 content::NotificationService::AllSources()); 375 content::NotificationService::AllSources());
375 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 376 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
376 content::Source<Profile>(profile_->GetOriginalProfile())); 377 content::Source<Profile>(profile_->GetOriginalProfile()));
377 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 378 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 if (contents && !allow_js_access) { 2311 if (contents && !allow_js_access) {
2311 contents->web_contents()->GetController().LoadURL( 2312 contents->web_contents()->GetController().LoadURL(
2312 target_url, 2313 target_url,
2313 content::Referrer(), 2314 content::Referrer(),
2314 content::PAGE_TRANSITION_LINK, 2315 content::PAGE_TRANSITION_LINK,
2315 std::string()); // No extra headers. 2316 std::string()); // No extra headers.
2316 } 2317 }
2317 2318
2318 return contents != NULL; 2319 return contents != NULL;
2319 } 2320 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/simple_web_view_dialog.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698