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

Side by Side Diff: chrome/renderer/page_click_tracker.h

Issue 8351009: Updating PageClickTracker to Notify listeners When Text Input Loses Focus. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixing issues pointed out in code review Created 9 years, 1 month 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) 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 #ifndef CHROME_RENDERER_PAGE_CLICK_TRACKER_H_ 5 #ifndef CHROME_RENDERER_PAGE_CLICK_TRACKER_H_
6 #define CHROME_RENDERER_PAGE_CLICK_TRACKER_H_ 6 #define CHROME_RENDERER_PAGE_CLICK_TRACKER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 private: 44 private:
45 // RenderView::Observer implementation. 45 // RenderView::Observer implementation.
46 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE; 46 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE;
47 virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE; 47 virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE;
48 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) OVERRIDE; 48 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) OVERRIDE;
49 49
50 // WebKit::WebDOMEventListener implementation. 50 // WebKit::WebDOMEventListener implementation.
51 virtual void handleEvent(const WebKit::WebDOMEvent& event); 51 virtual void handleEvent(const WebKit::WebDOMEvent& event);
52 52
53 // Checks to see if a text field is losing focus and inform listeners if
54 // it is.
55 void HandleTextFieldLosingFocus(const WebKit::WebNode& newly_clicked_node);
Ilya Sherman 2011/10/31 21:23:12 nit: "Handle" implies that the event being handled
csharp 2011/11/01 14:49:01 Done.
56
53 // The last node that was clicked and had focus. 57 // The last node that was clicked and had focus.
54 WebKit::WebNode last_node_clicked_; 58 WebKit::WebNode last_node_clicked_;
55 59
56 // Whether the last clicked node had focused before it was clicked. 60 // Whether the last clicked node had focused before it was clicked.
57 bool was_focused_; 61 bool was_focused_;
58 62
59 // The frames we are listening to for mouse events. 63 // The frames we are listening to for mouse events.
60 typedef std::vector<WebKit::WebFrame*> FrameList; 64 typedef std::vector<WebKit::WebFrame*> FrameList;
61 FrameList tracked_frames_; 65 FrameList tracked_frames_;
62 66
63 // The listener getting the actual notifications. 67 // The listener getting the actual notifications.
64 ObserverList<PageClickListener> listeners_; 68 ObserverList<PageClickListener> listeners_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); 70 DISALLOW_COPY_AND_ASSIGN(PageClickTracker);
67 }; 71 };
68 72
69 #endif // CHROME_RENDERER_PAGE_CLICK_TRACKER_H_ 73 #endif // CHROME_RENDERER_PAGE_CLICK_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698