| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // int response, | 70 // int response, |
| 71 // const net::ResponseCookies& cookies, | 71 // const net::ResponseCookies& cookies, |
| 72 // const std::string& data) { | 72 // const std::string& data) { |
| 73 // bool enabled = response == 200; | 73 // bool enabled = response == 200; |
| 74 // const char* text = enabled ? "OK" : "ERROR"; | 74 // const char* text = enabled ? "OK" : "ERROR"; |
| 75 // proxy_->UpdateMenuItem(id_, enabled, ASCIIToUTF16(text)); | 75 // proxy_->UpdateMenuItem(id_, enabled, ASCIIToUTF16(text)); |
| 76 // } | 76 // } |
| 77 // void Start(const GURL* url, net::URLRequestContextGetter* context) { | 77 // void Start(const GURL* url, net::URLRequestContextGetter* context) { |
| 78 // fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); | 78 // fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); |
| 79 // fetcher_->SetRequestContext(context); | 79 // fetcher_->SetRequestContext(context); |
| 80 // fetcher_->AssociateWithRenderView( | 80 // content::AssociateWithRenderView( |
| 81 // fetcher_.get(), |
| 81 // proxy_->GetRenderViewHost()->GetSiteInstance()->GetSite(), | 82 // proxy_->GetRenderViewHost()->GetSiteInstance()->GetSite(), |
| 82 // proxy_->GetRenderViewHost()->GetProcess()->GetID(), | 83 // proxy_->GetRenderViewHost()->GetProcess()->GetID(), |
| 83 // proxy_->GetRenderViewHost()->GetRoutingID()); | 84 // proxy_->GetRenderViewHost()->GetRoutingID()); |
| 84 // fetcher_->Start(); | 85 // fetcher_->Start(); |
| 85 // } | 86 // } |
| 86 // | 87 // |
| 87 // private: | 88 // private: |
| 88 // URLFetcher fetcher_; | 89 // URLFetcher fetcher_; |
| 89 // RenderViewContextMenuProxy* proxy_; | 90 // RenderViewContextMenuProxy* proxy_; |
| 90 // int id_; | 91 // int id_; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 // An observer that disables menu items when print preview is active. | 297 // An observer that disables menu items when print preview is active. |
| 297 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 298 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
| 298 | 299 |
| 299 // Our observers. | 300 // Our observers. |
| 300 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 301 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
| 301 | 302 |
| 302 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 303 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 303 }; | 304 }; |
| 304 | 305 |
| 305 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 306 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |