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

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu.h

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares 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 #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 28 matching lines...) Expand all
39 // An interface that controls a RenderViewContextMenu instance from observers. 39 // An interface that controls a RenderViewContextMenu instance from observers.
40 // This interface is designed mainly for controlling the instance while showing 40 // This interface is designed mainly for controlling the instance while showing
41 // so we can add a context-menu item that takes long time to create its text, 41 // so we can add a context-menu item that takes long time to create its text,
42 // such as retrieving the item text from a server. The simplest usage is: 42 // such as retrieving the item text from a server. The simplest usage is:
43 // 1. Adding an item with temporary text; 43 // 1. Adding an item with temporary text;
44 // 2. Posting a background task that creates the item text, and; 44 // 2. Posting a background task that creates the item text, and;
45 // 3. Calling UpdateMenuItem() in the callback function. 45 // 3. Calling UpdateMenuItem() in the callback function.
46 // The following snippet describes the simple usage that updates a context-menu 46 // The following snippet describes the simple usage that updates a context-menu
47 // item with this interface. 47 // item with this interface.
48 // 48 //
49 // class MyTask : public URLFetcher::Delegate { 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 URLFetcher* source,
58 // const GURL& url, 58 // const GURL& url,
59 // const net::URLRequestStatus& status, 59 // const net::URLRequestStatus& status,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698