| OLD | NEW |
| 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/bookmarks/bookmark_tab_helper.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/bookmarks/bookmark_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 9 #include "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
| 10 #include "chrome/browser/instant/search.h" |
| 10 #include "chrome/browser/prefs/pref_service_syncable.h" | 11 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 13 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
| 13 #include "chrome/browser/ui/search/search.h" | |
| 14 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 14 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "content/public/browser/navigation_entry.h" | 16 #include "content/public/browser/navigation_entry.h" |
| 17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 bool IsNTPWebUI(content::WebContents* web_contents) { | 21 bool IsNTPWebUI(content::WebContents* web_contents) { |
| 22 content::WebUI* web_ui = NULL; | 22 content::WebUI* web_ui = NULL; |
| 23 // Use the committed entry so the bookmarks bar disappears at the same time | 23 // Use the committed entry so the bookmarks bar disappears at the same time |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void BookmarkTabHelper::BookmarkNodeChanged(BookmarkModel* model, | 110 void BookmarkTabHelper::BookmarkNodeChanged(BookmarkModel* model, |
| 111 const BookmarkNode* node) { | 111 const BookmarkNode* node) { |
| 112 UpdateStarredStateForCurrentURL(); | 112 UpdateStarredStateForCurrentURL(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void BookmarkTabHelper::DidNavigateMainFrame( | 115 void BookmarkTabHelper::DidNavigateMainFrame( |
| 116 const content::LoadCommittedDetails& /*details*/, | 116 const content::LoadCommittedDetails& /*details*/, |
| 117 const content::FrameNavigateParams& /*params*/) { | 117 const content::FrameNavigateParams& /*params*/) { |
| 118 UpdateStarredStateForCurrentURL(); | 118 UpdateStarredStateForCurrentURL(); |
| 119 } | 119 } |
| OLD | NEW |