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 #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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // item with this interface. | 53 // item with this interface. |
54 // | 54 // |
55 // class MyTask : public content::URLFetcherDelegate { | 55 // class MyTask : public content::URLFetcherDelegate { |
56 // public: | 56 // public: |
57 // MyTask(RenderViewContextMenuProxy* proxy, int id) | 57 // MyTask(RenderViewContextMenuProxy* proxy, int id) |
58 // : proxy_(proxy), | 58 // : proxy_(proxy), |
59 // id_(id) { | 59 // id_(id) { |
60 // } | 60 // } |
61 // virtual ~MyTask() { | 61 // virtual ~MyTask() { |
62 // } | 62 // } |
63 // virtual void OnURLFetchComplete(const content::URLFetcher* source, | 63 // virtual void OnURLFetchComplete(const net::URLFetcher* source, |
64 // const GURL& url, | 64 // const GURL& url, |
65 // const net::URLRequestStatus& status, | 65 // const net::URLRequestStatus& status, |
66 // int response, | 66 // int response, |
67 // const net::ResponseCookies& cookies, | 67 // const net::ResponseCookies& cookies, |
68 // const std::string& data) { | 68 // const std::string& data) { |
69 // bool enabled = response == 200; | 69 // bool enabled = response == 200; |
70 // const char* text = enabled ? "OK" : "ERROR"; | 70 // const char* text = enabled ? "OK" : "ERROR"; |
71 // proxy_->UpdateMenuItem(id_, enabled, ASCIIToUTF16(text)); | 71 // proxy_->UpdateMenuItem(id_, enabled, ASCIIToUTF16(text)); |
72 // } | 72 // } |
73 // void Start(const GURL* url, net::URLRequestContextGetter* context) { | 73 // void Start(const GURL* url, net::URLRequestContextGetter* context) { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // An observer that disables menu items when print preview is active. | 292 // An observer that disables menu items when print preview is active. |
293 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 293 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
294 | 294 |
295 // Our observers. | 295 // Our observers. |
296 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 296 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
297 | 297 |
298 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 298 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
299 }; | 299 }; |
300 | 300 |
301 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 301 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |