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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 virtual void SetViewType(content::ViewType type) OVERRIDE; | 146 virtual void SetViewType(content::ViewType type) OVERRIDE; |
147 virtual content::ViewType GetViewType() const OVERRIDE; | 147 virtual content::ViewType GetViewType() const OVERRIDE; |
148 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; | 148 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; |
149 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; | 149 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; |
150 virtual content::RenderWidgetHostView* | 150 virtual content::RenderWidgetHostView* |
151 GetRenderWidgetHostView() const OVERRIDE; | 151 GetRenderWidgetHostView() const OVERRIDE; |
152 virtual content::WebContentsView* GetView() const OVERRIDE; | 152 virtual content::WebContentsView* GetView() const OVERRIDE; |
153 virtual content::WebUI* CreateWebUI(const GURL& url) OVERRIDE; | 153 virtual content::WebUI* CreateWebUI(const GURL& url) OVERRIDE; |
154 virtual content::WebUI* GetWebUI() const OVERRIDE; | 154 virtual content::WebUI* GetWebUI() const OVERRIDE; |
155 virtual content::WebUI* GetCommittedWebUI() const OVERRIDE; | 155 virtual content::WebUI* GetCommittedWebUI() const OVERRIDE; |
| 156 virtual void SetUserAgentOverride(const std::string& override) OVERRIDE; |
| 157 virtual const std::string& GetUserAgentOverride() const OVERRIDE; |
156 virtual const string16& GetTitle() const OVERRIDE; | 158 virtual const string16& GetTitle() const OVERRIDE; |
157 virtual int32 GetMaxPageID() OVERRIDE; | 159 virtual int32 GetMaxPageID() OVERRIDE; |
158 virtual int32 GetMaxPageIDForSiteInstance( | 160 virtual int32 GetMaxPageIDForSiteInstance( |
159 content::SiteInstance* site_instance) OVERRIDE; | 161 content::SiteInstance* site_instance) OVERRIDE; |
160 virtual content::SiteInstance* GetSiteInstance() const OVERRIDE; | 162 virtual content::SiteInstance* GetSiteInstance() const OVERRIDE; |
161 virtual content::SiteInstance* GetPendingSiteInstance() const OVERRIDE; | 163 virtual content::SiteInstance* GetPendingSiteInstance() const OVERRIDE; |
162 virtual bool IsLoading() const OVERRIDE; | 164 virtual bool IsLoading() const OVERRIDE; |
163 virtual bool IsWaitingForResponse() const OVERRIDE; | 165 virtual bool IsWaitingForResponse() const OVERRIDE; |
164 virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; | 166 virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; |
165 virtual const string16& GetLoadStateHost() const OVERRIDE; | 167 virtual const string16& GetLoadStateHost() const OVERRIDE; |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 // A list of observers notified when page state changes. Weak references. | 573 // A list of observers notified when page state changes. Weak references. |
572 // This MUST be listed above render_manager_ since at destruction time the | 574 // This MUST be listed above render_manager_ since at destruction time the |
573 // latter might cause RenderViewHost's destructor to call us and we might use | 575 // latter might cause RenderViewHost's destructor to call us and we might use |
574 // the observer list then. | 576 // the observer list then. |
575 ObserverList<content::WebContentsObserver> observers_; | 577 ObserverList<content::WebContentsObserver> observers_; |
576 | 578 |
577 // The tab that opened this tab, if any. Will be set to null if the opener | 579 // The tab that opened this tab, if any. Will be set to null if the opener |
578 // is closed. | 580 // is closed. |
579 WebContentsImpl* opener_; | 581 WebContentsImpl* opener_; |
580 | 582 |
| 583 // User agent to use if a NavigationEntry requires that the default user agent |
| 584 // is overridden. |
| 585 std::string user_agent_override_; |
| 586 |
581 // Helper classes ------------------------------------------------------------ | 587 // Helper classes ------------------------------------------------------------ |
582 | 588 |
583 // Manages creation and swapping of render views. | 589 // Manages creation and swapping of render views. |
584 RenderViewHostManager render_manager_; | 590 RenderViewHostManager render_manager_; |
585 | 591 |
586 // Manages injecting Java objects into all RenderViewHosts associated with | 592 // Manages injecting Java objects into all RenderViewHosts associated with |
587 // this WebContentsImpl. | 593 // this WebContentsImpl. |
588 scoped_ptr<JavaBridgeDispatcherHostManager> | 594 scoped_ptr<JavaBridgeDispatcherHostManager> |
589 java_bridge_dispatcher_host_manager_; | 595 java_bridge_dispatcher_host_manager_; |
590 | 596 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 // Our view type. Default is VIEW_TYPE_WEB_CONTENTS. | 711 // Our view type. Default is VIEW_TYPE_WEB_CONTENTS. |
706 content::ViewType view_type_; | 712 content::ViewType view_type_; |
707 | 713 |
708 // Color chooser that was opened by this tab. | 714 // Color chooser that was opened by this tab. |
709 content::ColorChooser* color_chooser_; | 715 content::ColorChooser* color_chooser_; |
710 | 716 |
711 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 717 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
712 }; | 718 }; |
713 | 719 |
714 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 720 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |