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_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
6 #define CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 6 #define CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "content/public/common/browser_controls_state.h" | 15 #include "content/public/common/browser_controls_state.h" |
16 #include "content/public/renderer/render_view_observer.h" | 16 #include "content/public/renderer/render_view_observer.h" |
17 #include "extensions/features/features.h" | 17 #include "extensions/features/features.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 namespace blink { | |
21 struct WebWindowFeatures; | |
22 } | |
23 | |
24 namespace web_cache { | 20 namespace web_cache { |
25 class WebCacheImpl; | 21 class WebCacheImpl; |
26 } | 22 } |
27 | 23 |
28 // This class holds the Chrome specific parts of RenderView, and has the same | 24 // This class holds the Chrome specific parts of RenderView, and has the same |
29 // lifetime. | 25 // lifetime. |
30 class ChromeRenderViewObserver : public content::RenderViewObserver { | 26 class ChromeRenderViewObserver : public content::RenderViewObserver { |
31 public: | 27 public: |
32 // translate_helper can be NULL. | 28 // translate_helper can be NULL. |
33 ChromeRenderViewObserver( | 29 ChromeRenderViewObserver( |
(...skipping 14 matching lines...) Expand all Loading... |
48 #endif | 44 #endif |
49 #if BUILDFLAG(ENABLE_EXTENSIONS) | 45 #if BUILDFLAG(ENABLE_EXTENSIONS) |
50 void OnSetVisuallyDeemphasized(bool deemphasized); | 46 void OnSetVisuallyDeemphasized(bool deemphasized); |
51 #endif | 47 #endif |
52 #if defined(OS_ANDROID) | 48 #if defined(OS_ANDROID) |
53 void OnUpdateBrowserControlsState(content::BrowserControlsState constraints, | 49 void OnUpdateBrowserControlsState(content::BrowserControlsState constraints, |
54 content::BrowserControlsState current, | 50 content::BrowserControlsState current, |
55 bool animate); | 51 bool animate); |
56 #endif | 52 #endif |
57 void OnGetWebApplicationInfo(); | 53 void OnGetWebApplicationInfo(); |
58 void OnSetWindowFeatures(const blink::WebWindowFeatures& window_features); | 54 void OnSetWindowFeatures(); |
59 | 55 |
60 // Determines if a host is in the strict security host set. | 56 // Determines if a host is in the strict security host set. |
61 bool IsStrictSecurityHost(const std::string& host); | 57 bool IsStrictSecurityHost(const std::string& host); |
62 | 58 |
63 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. | 59 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. |
64 std::vector<base::string16> webui_javascript_; | 60 std::vector<base::string16> webui_javascript_; |
65 | 61 |
66 // Owned by ChromeContentRendererClient and outlive us. | 62 // Owned by ChromeContentRendererClient and outlive us. |
67 web_cache::WebCacheImpl* web_cache_impl_; | 63 web_cache::WebCacheImpl* web_cache_impl_; |
68 | 64 |
69 // true if webview is overlayed with grey color. | 65 // true if webview is overlayed with grey color. |
70 bool webview_visually_deemphasized_; | 66 bool webview_visually_deemphasized_; |
71 | 67 |
72 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); | 68 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); |
73 }; | 69 }; |
74 | 70 |
75 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 71 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
OLD | NEW |