| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents/tab_contents_wrapper.h" | 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/browser/autocomplete_history_manager.h" | 8 #include "chrome/browser/autocomplete_history_manager.h" |
| 9 #include "chrome/browser/autofill/autofill_manager.h" | 9 #include "chrome/browser/autofill/autofill_manager.h" |
| 10 #include "chrome/browser/automation/automation_tab_helper.h" | 10 #include "chrome/browser/automation/automation_tab_helper.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" | 25 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" |
| 26 #include "chrome/browser/translate/translate_tab_helper.h" | 26 #include "chrome/browser/translate/translate_tab_helper.h" |
| 27 #include "chrome/browser/ui/download/download_tab_helper.h" | 27 #include "chrome/browser/ui/download/download_tab_helper.h" |
| 28 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 28 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 29 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 29 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
| 30 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" | 30 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" |
| 31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
| 32 #include "chrome/common/render_messages.h" | 32 #include "chrome/common/render_messages.h" |
| 33 #include "content/browser/tab_contents/tab_contents.h" | 33 #include "content/browser/tab_contents/tab_contents.h" |
| 34 #include "content/common/notification_service.h" | 34 #include "content/common/notification_service.h" |
| 35 #include "content/common/view_messages.h" |
| 35 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 36 #include "grit/locale_settings.h" | 37 #include "grit/locale_settings.h" |
| 37 #include "grit/platform_locale_settings.h" | 38 #include "grit/platform_locale_settings.h" |
| 38 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
| 39 #include "webkit/glue/webpreferences.h" | 40 #include "webkit/glue/webpreferences.h" |
| 40 | 41 |
| 41 static base::LazyInstance<PropertyAccessor<TabContentsWrapper*> > | 42 static base::LazyInstance<PropertyAccessor<TabContentsWrapper*> > |
| 42 g_tab_contents_wrapper_property_accessor(base::LINKER_INITIALIZED); | 43 g_tab_contents_wrapper_property_accessor(base::LINKER_INITIALIZED); |
| 43 | 44 |
| 44 //////////////////////////////////////////////////////////////////////////////// | 45 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 319 } |
| 319 | 320 |
| 320 void TabContentsWrapper::UpdateStarredStateForCurrentURL() { | 321 void TabContentsWrapper::UpdateStarredStateForCurrentURL() { |
| 321 BookmarkModel* model = tab_contents()->profile()->GetBookmarkModel(); | 322 BookmarkModel* model = tab_contents()->profile()->GetBookmarkModel(); |
| 322 const bool old_state = is_starred_; | 323 const bool old_state = is_starred_; |
| 323 is_starred_ = (model && model->IsBookmarked(tab_contents()->GetURL())); | 324 is_starred_ = (model && model->IsBookmarked(tab_contents()->GetURL())); |
| 324 | 325 |
| 325 if (is_starred_ != old_state && delegate()) | 326 if (is_starred_ != old_state && delegate()) |
| 326 delegate()->URLStarredChanged(this, is_starred_); | 327 delegate()->URLStarredChanged(this, is_starred_); |
| 327 } | 328 } |
| OLD | NEW |