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

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

Issue 3332022: Bunch of match preview tweaks: (Closed)
Patch Set: Add string16 include Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/renderer_host/resource_request_details.h" 70 #include "chrome/browser/renderer_host/resource_request_details.h"
71 #include "chrome/browser/renderer_host/site_instance.h" 71 #include "chrome/browser/renderer_host/site_instance.h"
72 #include "chrome/browser/renderer_host/web_cache_manager.h" 72 #include "chrome/browser/renderer_host/web_cache_manager.h"
73 #include "chrome/browser/renderer_preferences_util.h" 73 #include "chrome/browser/renderer_preferences_util.h"
74 #include "chrome/browser/search_engines/template_url.h" 74 #include "chrome/browser/search_engines/template_url.h"
75 #include "chrome/browser/search_engines/template_url_fetcher.h" 75 #include "chrome/browser/search_engines/template_url_fetcher.h"
76 #include "chrome/browser/search_engines/template_url_model.h" 76 #include "chrome/browser/search_engines/template_url_model.h"
77 #include "chrome/browser/sessions/session_types.h" 77 #include "chrome/browser/sessions/session_types.h"
78 #include "chrome/browser/tab_contents/infobar_delegate.h" 78 #include "chrome/browser/tab_contents/infobar_delegate.h"
79 #include "chrome/browser/tab_contents/interstitial_page.h" 79 #include "chrome/browser/tab_contents/interstitial_page.h"
80 #include "chrome/browser/tab_contents/match_preview.h"
81 #include "chrome/browser/tab_contents/navigation_entry.h" 80 #include "chrome/browser/tab_contents/navigation_entry.h"
82 #include "chrome/browser/tab_contents/provisional_load_details.h" 81 #include "chrome/browser/tab_contents/provisional_load_details.h"
83 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 82 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
84 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" 83 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
85 #include "chrome/browser/tab_contents/tab_contents_view.h" 84 #include "chrome/browser/tab_contents/tab_contents_view.h"
86 #include "chrome/browser/tab_contents/thumbnail_generator.h" 85 #include "chrome/browser/tab_contents/thumbnail_generator.h"
87 #include "chrome/browser/translate/page_translated_details.h" 86 #include "chrome/browser/translate/page_translated_details.h"
88 #include "chrome/common/bindings_policy.h" 87 #include "chrome/common/bindings_policy.h"
89 #include "chrome/common/chrome_switches.h" 88 #include "chrome/common/chrome_switches.h"
90 #include "chrome/common/extensions/extension.h" 89 #include "chrome/common/extensions/extension.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 registrar_.Add(this, NotificationType::EXTENSION_LOADED, 426 registrar_.Add(this, NotificationType::EXTENSION_LOADED,
428 NotificationService::AllSources()); 427 NotificationService::AllSources());
429 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, 428 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
430 NotificationService::AllSources()); 429 NotificationService::AllSources());
431 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED, 430 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED,
432 NotificationService::AllSources()); 431 NotificationService::AllSources());
433 432
434 // Set-up the showing of the omnibox search infobar if applicable. 433 // Set-up the showing of the omnibox search infobar if applicable.
435 if (OmniboxSearchHint::IsEnabled(profile)) 434 if (OmniboxSearchHint::IsEnabled(profile))
436 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); 435 omnibox_search_hint_.reset(new OmniboxSearchHint(this));
437
438 if (MatchPreview::IsEnabled())
439 match_preview_.reset(new MatchPreview(this));
440 } 436 }
441 437
442 TabContents::~TabContents() { 438 TabContents::~TabContents() {
443 is_being_destroyed_ = true; 439 is_being_destroyed_ = true;
444 440
445 // We don't want any notifications while we're running our destructor. 441 // We don't want any notifications while we're running our destructor.
446 registrar_.RemoveAll(); 442 registrar_.RemoveAll();
447 443
448 // Unregister the notifications of all observed prefs change. 444 // Unregister the notifications of all observed prefs change.
449 PrefService* prefs = profile()->GetPrefs(); 445 PrefService* prefs = profile()->GetPrefs();
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3269 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3274 } 3270 }
3275 3271
3276 Profile* TabContents::GetProfileForPasswordManager() { 3272 Profile* TabContents::GetProfileForPasswordManager() {
3277 return profile(); 3273 return profile();
3278 } 3274 }
3279 3275
3280 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3276 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3281 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3277 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3282 } 3278 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698