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 #ifndef CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" | 15 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" |
16 #include "content/public/common/url_fetcher_delegate.h" | 16 #include "content/public/common/url_fetcher_delegate.h" |
17 | 17 |
18 class GURL; | |
19 class RenderViewContextMenuProxy; | 18 class RenderViewContextMenuProxy; |
20 | 19 |
21 namespace net { | 20 namespace net { |
22 class URLRequestContextGetter; | 21 class URLRequestContextGetter; |
23 } | 22 } |
24 | 23 |
25 // An observer that listens to events from the RenderViewContextMenu class and | 24 // An observer that listens to events from the RenderViewContextMenu class and |
26 // shows suggestions from the Spelling ("do you mean") service to a context menu | 25 // shows suggestions from the Spelling ("do you mean") service to a context menu |
27 // while we show it. This class implements two interfaces: | 26 // while we show it. This class implements two interfaces: |
28 // * RenderViewContextMenuObserver | 27 // * RenderViewContextMenuObserver |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // The URLFetcher object used for sending a JSON-RPC request. | 101 // The URLFetcher object used for sending a JSON-RPC request. |
103 scoped_ptr<content::URLFetcher> fetcher_; | 102 scoped_ptr<content::URLFetcher> fetcher_; |
104 | 103 |
105 // A timer used for loading animation. | 104 // A timer used for loading animation. |
106 base::RepeatingTimer<SpellingMenuObserver> animation_timer_; | 105 base::RepeatingTimer<SpellingMenuObserver> animation_timer_; |
107 | 106 |
108 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); | 107 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); |
109 }; | 108 }; |
110 | 109 |
111 #endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ | 110 #endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ |
OLD | NEW |