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

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

Issue 1653013002: Abstract ToolbarModelImpl dependencies on //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1
Patch Set: Address comments Created 4 years, 10 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 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 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 #include "content/public/browser/render_frame_host.h" 184 #include "content/public/browser/render_frame_host.h"
185 #include "content/public/browser/render_process_host.h" 185 #include "content/public/browser/render_process_host.h"
186 #include "content/public/browser/render_view_host.h" 186 #include "content/public/browser/render_view_host.h"
187 #include "content/public/browser/render_widget_host.h" 187 #include "content/public/browser/render_widget_host.h"
188 #include "content/public/browser/render_widget_host_view.h" 188 #include "content/public/browser/render_widget_host_view.h"
189 #include "content/public/browser/security_style_explanation.h" 189 #include "content/public/browser/security_style_explanation.h"
190 #include "content/public/browser/security_style_explanations.h" 190 #include "content/public/browser/security_style_explanations.h"
191 #include "content/public/browser/site_instance.h" 191 #include "content/public/browser/site_instance.h"
192 #include "content/public/browser/user_metrics.h" 192 #include "content/public/browser/user_metrics.h"
193 #include "content/public/browser/web_contents.h" 193 #include "content/public/browser/web_contents.h"
194 #include "content/public/common/content_constants.h"
194 #include "content/public/common/content_switches.h" 195 #include "content/public/common/content_switches.h"
195 #include "content/public/common/page_zoom.h" 196 #include "content/public/common/page_zoom.h"
196 #include "content/public/common/renderer_preferences.h" 197 #include "content/public/common/renderer_preferences.h"
197 #include "content/public/common/ssl_status.h" 198 #include "content/public/common/ssl_status.h"
198 #include "content/public/common/webplugininfo.h" 199 #include "content/public/common/webplugininfo.h"
199 #include "extensions/browser/extension_prefs.h" 200 #include "extensions/browser/extension_prefs.h"
200 #include "extensions/browser/extension_registry.h" 201 #include "extensions/browser/extension_registry.h"
201 #include "extensions/browser/extension_system.h" 202 #include "extensions/browser/extension_system.h"
202 #include "extensions/common/constants.h" 203 #include "extensions/common/constants.h"
203 #include "extensions/common/extension.h" 204 #include "extensions/common/extension.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 content::RecordAction(base::UserMetricsAction("BrowserForSystemProfile")); 409 content::RecordAction(base::UserMetricsAction("BrowserForSystemProfile"));
409 410
410 // TODO(jeremy): Move to initializer list once flag is removed. 411 // TODO(jeremy): Move to initializer list once flag is removed.
411 if (IsFastTabUnloadEnabled()) 412 if (IsFastTabUnloadEnabled())
412 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); 413 fast_unload_controller_.reset(new chrome::FastUnloadController(this));
413 else 414 else
414 unload_controller_.reset(new chrome::UnloadController(this)); 415 unload_controller_.reset(new chrome::UnloadController(this));
415 416
416 tab_strip_model_->AddObserver(this); 417 tab_strip_model_->AddObserver(this);
417 418
418 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get())); 419 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get(),
420 content::kMaxURLDisplayChars));
419 search_model_.reset(new SearchModel()); 421 search_model_.reset(new SearchModel());
420 search_delegate_.reset(new SearchDelegate(search_model_.get())); 422 search_delegate_.reset(new SearchDelegate(search_model_.get()));
421 423
422 extension_registry_observer_.Add( 424 extension_registry_observer_.Add(
423 extensions::ExtensionRegistry::Get(profile_)); 425 extensions::ExtensionRegistry::Get(profile_));
424 registrar_.Add(this, 426 registrar_.Add(this,
425 extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 427 extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
426 content::NotificationService::AllSources()); 428 content::NotificationService::AllSources());
427 #if defined(ENABLE_THEMES) 429 #if defined(ENABLE_THEMES)
428 registrar_.Add( 430 registrar_.Add(
(...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 if (contents && !allow_js_access) { 2741 if (contents && !allow_js_access) {
2740 contents->web_contents()->GetController().LoadURL( 2742 contents->web_contents()->GetController().LoadURL(
2741 target_url, 2743 target_url,
2742 content::Referrer(), 2744 content::Referrer(),
2743 ui::PAGE_TRANSITION_LINK, 2745 ui::PAGE_TRANSITION_LINK,
2744 std::string()); // No extra headers. 2746 std::string()); // No extra headers.
2745 } 2747 }
2746 2748
2747 return contents != NULL; 2749 return contents != NULL;
2748 } 2750 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/toolbar/toolbar_model_android.cc ('k') | chrome/browser/ui/browser_toolbar_model_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698