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

Side by Side Diff: content/browser/tab_contents/tab_contents.h

Issue 6713082: Move WebUIFactory to chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ContentWebUIClient Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TAB_CONTENTS_TAB_CONTENTS_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 13 matching lines...) Expand all
24 #include "chrome/common/instant_types.h" 24 #include "chrome/common/instant_types.h"
25 #include "chrome/common/translate_errors.h" 25 #include "chrome/common/translate_errors.h"
26 #include "chrome/common/web_apps.h" 26 #include "chrome/common/web_apps.h"
27 #include "content/browser/renderer_host/render_view_host_delegate.h" 27 #include "content/browser/renderer_host/render_view_host_delegate.h"
28 #include "content/browser/tab_contents/constrained_window.h" 28 #include "content/browser/tab_contents/constrained_window.h"
29 #include "content/browser/tab_contents/language_state.h" 29 #include "content/browser/tab_contents/language_state.h"
30 #include "content/browser/tab_contents/navigation_controller.h" 30 #include "content/browser/tab_contents/navigation_controller.h"
31 #include "content/browser/tab_contents/navigation_entry.h" 31 #include "content/browser/tab_contents/navigation_entry.h"
32 #include "content/browser/tab_contents/page_navigator.h" 32 #include "content/browser/tab_contents/page_navigator.h"
33 #include "content/browser/tab_contents/render_view_host_manager.h" 33 #include "content/browser/tab_contents/render_view_host_manager.h"
34 #include "content/browser/webui/web_ui_factory.h" 34 #include "content/browser/webui/web_ui.h"
35 #include "content/common/notification_registrar.h" 35 #include "content/common/notification_registrar.h"
36 #include "content/common/property_bag.h" 36 #include "content/common/property_bag.h"
37 #include "content/common/renderer_preferences.h" 37 #include "content/common/renderer_preferences.h"
38 #include "net/base/load_states.h" 38 #include "net/base/load_states.h"
39 #include "net/base/network_change_notifier.h" 39 #include "net/base/network_change_notifier.h"
40 #include "ui/gfx/native_widget_types.h" 40 #include "ui/gfx/native_widget_types.h"
41 41
42 #if defined(OS_WIN) 42 #if defined(OS_WIN)
43 #include "base/win/scoped_handle.h" 43 #include "base/win/scoped_handle.h"
44 #endif 44 #endif
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 class RenderViewHost; 77 class RenderViewHost;
78 class SessionStorageNamespace; 78 class SessionStorageNamespace;
79 class SiteInstance; 79 class SiteInstance;
80 class SkBitmap; 80 class SkBitmap;
81 class TabContents; 81 class TabContents;
82 class TabContentsDelegate; 82 class TabContentsDelegate;
83 class TabContentsObserver; 83 class TabContentsObserver;
84 class TabContentsSSLHelper; 84 class TabContentsSSLHelper;
85 class TabContentsView; 85 class TabContentsView;
86 class URLPattern; 86 class URLPattern;
87 class WebUISource;
87 struct RendererPreferences; 88 struct RendererPreferences;
88 struct ThumbnailScore; 89 struct ThumbnailScore;
89 struct ViewHostMsg_DomMessage_Params; 90 struct ViewHostMsg_DomMessage_Params;
90 struct ViewHostMsg_FrameNavigate_Params; 91 struct ViewHostMsg_FrameNavigate_Params;
91 struct WebPreferences; 92 struct WebPreferences;
92 93
93 // Describes what goes in the main content area of a tab. TabContents is 94 // Describes what goes in the main content area of a tab. TabContents is
94 // the only type of TabContents, and these should be merged together. 95 // the only type of TabContents, and these should be merged together.
95 class TabContents : public PageNavigator, 96 class TabContents : public PageNavigator,
96 public NotificationObserver, 97 public NotificationObserver,
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 void SetAllContentsBlocked(bool value); 599 void SetAllContentsBlocked(bool value);
599 600
600 BlockedContentContainer* blocked_content_container() const { 601 BlockedContentContainer* blocked_content_container() const {
601 return blocked_contents_; 602 return blocked_contents_;
602 } 603 }
603 604
604 RendererPreferences* GetMutableRendererPrefs() { 605 RendererPreferences* GetMutableRendererPrefs() {
605 return &renderer_preferences_; 606 return &renderer_preferences_;
606 } 607 }
607 608
608 void set_opener_web_ui_type(WebUITypeID opener_web_ui_type) { 609 void set_opener_web_ui_type(WebUI::WebUITypeID opener_web_ui_type) {
609 opener_web_ui_type_ = opener_web_ui_type; 610 opener_web_ui_type_ = opener_web_ui_type;
610 } 611 }
611 612
612 // We want to time how long it takes to create a new tab page. This method 613 // We want to time how long it takes to create a new tab page. This method
613 // gets called as parts of the new tab page have loaded. 614 // gets called as parts of the new tab page have loaded.
614 void LogNewTabTime(const std::string& event_name); 615 void LogNewTabTime(const std::string& event_name);
615 616
616 // Set the time when we started to create the new tab page. This time is 617 // Set the time when we started to create the new tab page. This time is
617 // from before we created this TabContents. 618 // from before we created this TabContents.
618 void set_new_tab_start_time(const base::TimeTicks& time) { 619 void set_new_tab_start_time(const base::TimeTicks& time) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 // Gets the minimum/maximum zoom percent. 698 // Gets the minimum/maximum zoom percent.
698 int minimum_zoom_percent() const { return minimum_zoom_percent_; } 699 int minimum_zoom_percent() const { return minimum_zoom_percent_; }
699 int maximum_zoom_percent() const { return maximum_zoom_percent_; } 700 int maximum_zoom_percent() const { return maximum_zoom_percent_; }
700 701
701 int content_restrictions() const { return content_restrictions_; } 702 int content_restrictions() const { return content_restrictions_; }
702 703
703 safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() { 704 safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() {
704 return safebrowsing_detection_host_.get(); 705 return safebrowsing_detection_host_.get();
705 } 706 }
706 707
708 // Query the WebUISource for the WebUITypeID for the current URL.
stuartmorgan 2011/03/24 23:14:31 Stale reference to WebUISource
709 WebUI::WebUITypeID GetWebUITypeForCurrentState();
710
707 protected: 711 protected:
708 // from RenderViewHostDelegate. 712 // from RenderViewHostDelegate.
709 virtual bool OnMessageReceived(const IPC::Message& message); 713 virtual bool OnMessageReceived(const IPC::Message& message);
710 714
711 private: 715 private:
712 friend class NavigationController; 716 friend class NavigationController;
713 // Used to access the child_windows_ (ConstrainedWindowList) for testing 717 // Used to access the child_windows_ (ConstrainedWindowList) for testing
714 // automation purposes. 718 // automation purposes.
715 friend class TestingAutomationProvider; 719 friend class TestingAutomationProvider;
716 720
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1187
1184 // Shows an info-bar to users when they search from a known search engine and 1188 // Shows an info-bar to users when they search from a known search engine and
1185 // have never used the monibox for search before. 1189 // have never used the monibox for search before.
1186 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; 1190 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_;
1187 1191
1188 // Settings that get passed to the renderer process. 1192 // Settings that get passed to the renderer process.
1189 RendererPreferences renderer_preferences_; 1193 RendererPreferences renderer_preferences_;
1190 1194
1191 // If this tab was created from a renderer using window.open, this will be 1195 // If this tab was created from a renderer using window.open, this will be
1192 // non-NULL and represent the WebUI of the opening renderer. 1196 // non-NULL and represent the WebUI of the opening renderer.
1193 WebUITypeID opener_web_ui_type_; 1197 WebUI::WebUITypeID opener_web_ui_type_;
1194 1198
1195 // The time that we started to create the new tab page. 1199 // The time that we started to create the new tab page.
1196 base::TimeTicks new_tab_start_time_; 1200 base::TimeTicks new_tab_start_time_;
1197 1201
1198 // The time that we started to close the tab. 1202 // The time that we started to close the tab.
1199 base::TimeTicks tab_close_start_time_; 1203 base::TimeTicks tab_close_start_time_;
1200 1204
1201 // The time that this tab was last selected. 1205 // The time that this tab was last selected.
1202 base::TimeTicks last_selected_time_; 1206 base::TimeTicks last_selected_time_;
1203 1207
(...skipping 15 matching lines...) Expand all
1219 ObserverList<TabContentsObserver> observers_; 1223 ObserverList<TabContentsObserver> observers_;
1220 1224
1221 // Content restrictions, used to disable print/copy etc based on content's 1225 // Content restrictions, used to disable print/copy etc based on content's
1222 // (full-page plugins for now only) permissions. 1226 // (full-page plugins for now only) permissions.
1223 int content_restrictions_; 1227 int content_restrictions_;
1224 1228
1225 DISALLOW_COPY_AND_ASSIGN(TabContents); 1229 DISALLOW_COPY_AND_ASSIGN(TabContents);
1226 }; 1230 };
1227 1231
1228 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 1232 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/render_view_host_manager.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698