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

Side by Side Diff: components/data_reduction_proxy/content/renderer/content_previews_render_frame_observer.h

Issue 2963913002: Factor DRP PreviewsState logic out of content (Closed)
Patch Set: dougarnett comments Created 3 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_RENDERER_CONTENT_PREVIEWS_RENDER _FRAME_OBSERVER_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_RENDERER_CONTENT_PREVIEWS_RENDER _FRAME_OBSERVER_H_
7
8 #include "base/macros.h"
9 #include "content/public/common/previews_state.h"
10 #include "content/public/renderer/render_frame_observer.h"
11 #include "third_party/WebKit/public/platform/WebURLResponse.h"
12
13 namespace data_reduction_proxy {
14
15 class ContentPreviewsRenderFrameObserver : public content::RenderFrameObserver {
Charlie Reis 2017/07/06 20:12:21 Can you add a comment about lifetime and who owns
megjablon 2017/07/10 17:38:08 Done.
16 public:
17 ContentPreviewsRenderFrameObserver(content::RenderFrame* render_frame);
18 ~ContentPreviewsRenderFrameObserver() override;
19
20 static content::PreviewsState GetPreviewsStateFromResponse(
21 content::PreviewsState original_state,
22 const blink::WebURLResponse& web_url_response);
23
24 private:
25 // content::RenderFrameObserver:
26 void OnDestruct() override;
27 void DidCommitProvisionalLoad(bool is_new_navigation,
28 bool is_same_document_navigation) override;
29
30 DISALLOW_COPY_AND_ASSIGN(ContentPreviewsRenderFrameObserver);
31 };
32
33 } // namespace data_reduction_proxy
34 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_RENDERER_CONTENT_PREVIEWS_REN DER_FRAME_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698