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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
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/find_bar/find_tab_helper.h" 5 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/find_bar/find_bar_state.h" 10 #include "chrome/browser/ui/find_bar/find_bar_state.h"
11 #include "content/browser/renderer_host/render_view_host.h" 11 #include "content/browser/renderer_host/render_view_host.h"
12 #include "content/browser/tab_contents/tab_contents.h" 12 #include "content/browser/tab_contents/tab_contents.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "content/common/notification_service.h" 14 #include "content/public/browser/notification_service.h"
15 #include "content/common/view_message_enums.h" 15 #include "content/common/view_message_enums.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
17 17
18 using WebKit::WebFindOptions; 18 using WebKit::WebFindOptions;
19 19
20 // static 20 // static
21 int FindTabHelper::find_request_id_counter_ = -1; 21 int FindTabHelper::find_request_id_counter_ = -1;
22 22
23 FindTabHelper::FindTabHelper(TabContents* tab_contents) 23 FindTabHelper::FindTabHelper(TabContents* tab_contents)
24 : TabContentsObserver(tab_contents), 24 : TabContentsObserver(tab_contents),
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 gfx::Rect selection = selection_rect; 140 gfx::Rect selection = selection_rect;
141 if (selection.IsEmpty()) 141 if (selection.IsEmpty())
142 selection = last_search_result_.selection_rect(); 142 selection = last_search_result_.selection_rect();
143 143
144 // Notify the UI, automation and any other observers that a find result was 144 // Notify the UI, automation and any other observers that a find result was
145 // found. 145 // found.
146 last_search_result_ = FindNotificationDetails( 146 last_search_result_ = FindNotificationDetails(
147 request_id, number_of_matches, selection, active_match_ordinal, 147 request_id, number_of_matches, selection, active_match_ordinal,
148 final_update); 148 final_update);
149 NotificationService::current()->Notify( 149 content::NotificationService::current()->Notify(
150 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, 150 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
151 content::Source<TabContents>(tab_contents()), 151 content::Source<TabContents>(tab_contents()),
152 content::Details<FindNotificationDetails>(&last_search_result_)); 152 content::Details<FindNotificationDetails>(&last_search_result_));
153 } 153 }
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | chrome/browser/ui/global_error_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698