| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) { |
| 74 // fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); | 74 // fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); |
| 75 // fetcher_->SetRequestContext(context); | 75 // fetcher_->SetRequestContext(context); |
| 76 // fetcher_->AssociateWithRenderView( |
| 77 // proxy_->GetRenderViewHost()->GetSiteInstance()->GetSite(), |
| 78 // proxy_->GetRenderViewHost()->GetProcess()->GetID(), |
| 79 // proxy_->GetRenderViewHost()->GetRoutingID()); |
| 76 // fetcher_->Start(); | 80 // fetcher_->Start(); |
| 77 // } | 81 // } |
| 78 // | 82 // |
| 79 // private: | 83 // private: |
| 80 // URLFetcher fetcher_; | 84 // URLFetcher fetcher_; |
| 81 // RenderViewContextMenuProxy* proxy_; | 85 // RenderViewContextMenuProxy* proxy_; |
| 82 // int id_; | 86 // int id_; |
| 83 // }; | 87 // }; |
| 84 // | 88 // |
| 85 // void RenderViewContextMenu::AppendEditableItems() { | 89 // void RenderViewContextMenu::AppendEditableItems() { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // An observer that disables menu items when print preview is active. | 290 // An observer that disables menu items when print preview is active. |
| 287 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 291 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
| 288 | 292 |
| 289 // Our observers. | 293 // Our observers. |
| 290 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 294 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
| 291 | 295 |
| 292 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 296 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 293 }; | 297 }; |
| 294 | 298 |
| 295 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 299 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |