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

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

Issue 6526059: Plumb through NetworkChangeNotifier::IsOffline() to WebKit, enabling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Appease the C++ type system 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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17 matching lines...) Expand all
28 #include "chrome/common/translate_errors.h" 28 #include "chrome/common/translate_errors.h"
29 #include "chrome/common/web_apps.h" 29 #include "chrome/common/web_apps.h"
30 #include "content/browser/tab_contents/constrained_window.h" 30 #include "content/browser/tab_contents/constrained_window.h"
31 #include "content/browser/tab_contents/language_state.h" 31 #include "content/browser/tab_contents/language_state.h"
32 #include "content/browser/tab_contents/navigation_controller.h" 32 #include "content/browser/tab_contents/navigation_controller.h"
33 #include "content/browser/tab_contents/navigation_entry.h" 33 #include "content/browser/tab_contents/navigation_entry.h"
34 #include "content/browser/tab_contents/page_navigator.h" 34 #include "content/browser/tab_contents/page_navigator.h"
35 #include "content/browser/tab_contents/render_view_host_manager.h" 35 #include "content/browser/tab_contents/render_view_host_manager.h"
36 #include "content/browser/webui/web_ui_factory.h" 36 #include "content/browser/webui/web_ui_factory.h"
37 #include "net/base/load_states.h" 37 #include "net/base/load_states.h"
38 #include "net/base/network_change_notifier.h"
38 #include "ui/gfx/native_widget_types.h" 39 #include "ui/gfx/native_widget_types.h"
39 40
40 #if defined(OS_WIN) 41 #if defined(OS_WIN)
41 #include "base/win/scoped_handle.h" 42 #include "base/win/scoped_handle.h"
42 #endif 43 #endif
43 44
44 namespace gfx { 45 namespace gfx {
45 class Rect; 46 class Rect;
46 } 47 }
47 48
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 struct WebPreferences; 95 struct WebPreferences;
95 96
96 // Describes what goes in the main content area of a tab. TabContents is 97 // Describes what goes in the main content area of a tab. TabContents is
97 // the only type of TabContents, and these should be merged together. 98 // the only type of TabContents, and these should be merged together.
98 class TabContents : public PageNavigator, 99 class TabContents : public PageNavigator,
99 public NotificationObserver, 100 public NotificationObserver,
100 public RenderViewHostDelegate, 101 public RenderViewHostDelegate,
101 public RenderViewHostManager::Delegate, 102 public RenderViewHostManager::Delegate,
102 public JavaScriptAppModalDialogDelegate, 103 public JavaScriptAppModalDialogDelegate,
103 public ImageLoadingTracker::Observer, 104 public ImageLoadingTracker::Observer,
104 public TabSpecificContentSettings::Delegate { 105 public TabSpecificContentSettings::Delegate,
106 public net::NetworkChangeNotifier::OnlineStateObserver {
105 public: 107 public:
106 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it 108 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it
107 // what has changed. Combine them to update more than one thing. 109 // what has changed. Combine them to update more than one thing.
108 enum InvalidateTypes { 110 enum InvalidateTypes {
109 INVALIDATE_URL = 1 << 0, // The URL has changed. 111 INVALIDATE_URL = 1 << 0, // The URL has changed.
110 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed 112 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed
111 // state changed. 113 // state changed.
112 INVALIDATE_LOAD = 1 << 2, // The loading state has changed. 114 INVALIDATE_LOAD = 1 << 2, // The loading state has changed.
113 INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed. 115 INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed.
114 INVALIDATE_BOOKMARK_BAR = 1 << 4, // State of ShouldShowBookmarkBar 116 INVALIDATE_BOOKMARK_BAR = 1 << 4, // State of ShouldShowBookmarkBar
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 const Extension* GetExtensionContaining(const GURL& url); 1021 const Extension* GetExtensionContaining(const GURL& url);
1020 1022
1021 // Resets app_icon_ and if |extension| is non-null creates a new 1023 // Resets app_icon_ and if |extension| is non-null creates a new
1022 // ImageLoadingTracker to load the extension's image. 1024 // ImageLoadingTracker to load the extension's image.
1023 void UpdateExtensionAppIcon(const Extension* extension); 1025 void UpdateExtensionAppIcon(const Extension* extension);
1024 1026
1025 // ImageLoadingTracker::Observer. 1027 // ImageLoadingTracker::Observer.
1026 virtual void OnImageLoaded(SkBitmap* image, ExtensionResource resource, 1028 virtual void OnImageLoaded(SkBitmap* image, ExtensionResource resource,
1027 int index); 1029 int index);
1028 1030
1031 // NetworkChangeNotifier::OnlineStateObserver:
1032 virtual void OnOnlineStateChanged(bool online);
1033
1029 // Checks with the PrerenderManager if the specified URL has been preloaded, 1034 // Checks with the PrerenderManager if the specified URL has been preloaded,
1030 // and if so, swap the RenderViewHost with the preload into this TabContents 1035 // and if so, swap the RenderViewHost with the preload into this TabContents
1031 // object. 1036 // object.
1032 bool MaybeUsePreloadedPage(const GURL& url); 1037 bool MaybeUsePreloadedPage(const GURL& url);
1033 1038
1034 // Adds the given window to the list of child windows. The window will notify 1039 // Adds the given window to the list of child windows. The window will notify
1035 // via WillClose() when it is being destroyed. 1040 // via WillClose() when it is being destroyed.
1036 void AddConstrainedDialog(ConstrainedWindow* window); 1041 void AddConstrainedDialog(ConstrainedWindow* window);
1037 1042
1038 // Data for core operation --------------------------------------------------- 1043 // Data for core operation ---------------------------------------------------
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 // (full-page plugins for now only) permissions. 1265 // (full-page plugins for now only) permissions.
1261 int content_restrictions_; 1266 int content_restrictions_;
1262 1267
1263 // Were the contents of this tab previously prerendered? 1268 // Were the contents of this tab previously prerendered?
1264 bool was_prerendered_; 1269 bool was_prerendered_;
1265 1270
1266 DISALLOW_COPY_AND_ASSIGN(TabContents); 1271 DISALLOW_COPY_AND_ASSIGN(TabContents);
1267 }; 1272 };
1268 1273
1269 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 1274 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698