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_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // item with this interface. | 47 // item with this interface. |
48 // | 48 // |
49 // class MyTask : public content::URLFetcherDelegate { | 49 // class MyTask : public content::URLFetcherDelegate { |
50 // public: | 50 // public: |
51 // MyTask(RenderViewContextMenuProxy* proxy, int id) | 51 // MyTask(RenderViewContextMenuProxy* proxy, int id) |
52 // : proxy_(proxy), | 52 // : proxy_(proxy), |
53 // id_(id) { | 53 // id_(id) { |
54 // } | 54 // } |
55 // virtual ~MyTask() { | 55 // virtual ~MyTask() { |
56 // } | 56 // } |
57 // virtual void OnURLFetchComplete(const URLFetcher* source, | 57 // virtual void OnURLFetchComplete(const content::URLFetcher* source, |
58 // const GURL& url, | 58 // const GURL& url, |
59 // const net::URLRequestStatus& status, | 59 // const net::URLRequestStatus& status, |
60 // int response, | 60 // int response, |
61 // const net::ResponseCookies& cookies, | 61 // const net::ResponseCookies& cookies, |
62 // const std::string& data) { | 62 // const std::string& data) { |
63 // bool enabled = response == 200; | 63 // bool enabled = response == 200; |
64 // const char* text = enabled ? "OK" : "ERROR"; | 64 // const char* text = enabled ? "OK" : "ERROR"; |
65 // proxy_->UpdateMenuItem(id_, enabled, ASCIIToUTF16(text)); | 65 // proxy_->UpdateMenuItem(id_, enabled, ASCIIToUTF16(text)); |
66 // } | 66 // } |
67 // void Start(const GURL* url, net::URLRequestContextGetter* context) { | 67 // void Start(const GURL* url, net::URLRequestContextGetter* context) { |
68 // fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); | 68 // fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); |
69 // fetcher_->set_request_context(context); | 69 // fetcher_->SetRequestContext(context); |
70 // fetcher_->Start(); | 70 // fetcher_->Start(); |
71 // } | 71 // } |
72 // | 72 // |
73 // private: | 73 // private: |
74 // URLFetcher fetcher_; | 74 // URLFetcher fetcher_; |
75 // RenderViewContextMenuProxy* proxy_; | 75 // RenderViewContextMenuProxy* proxy_; |
76 // int id_; | 76 // int id_; |
77 // }; | 77 // }; |
78 // | 78 // |
79 // void RenderViewContextMenu::AppendEditableItems() { | 79 // void RenderViewContextMenu::AppendEditableItems() { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // An observer that handles a spelling-menu items. | 253 // An observer that handles a spelling-menu items. |
254 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; | 254 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; |
255 | 255 |
256 // Our observers. | 256 // Our observers. |
257 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 257 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
258 | 258 |
259 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 259 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
260 }; | 260 }; |
261 | 261 |
262 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 262 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |