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

Side by Side Diff: chrome/browser/extensions/extension_host.h

Issue 208020: Change the view mode when switching between moles and toolstrips, and (Closed)
Patch Set: build system workarounds Created 11 years, 3 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
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/extension_host.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 Extension* extension() { return extension_; } 63 Extension* extension() { return extension_; }
64 RenderViewHost* render_view_host() const { return render_view_host_; } 64 RenderViewHost* render_view_host() const { return render_view_host_; }
65 RenderProcessHost* render_process_host() const; 65 RenderProcessHost* render_process_host() const;
66 SiteInstance* site_instance() const; 66 SiteInstance* site_instance() const;
67 bool did_stop_loading() const { return did_stop_loading_; } 67 bool did_stop_loading() const { return did_stop_loading_; }
68 bool document_element_available() const { 68 bool document_element_available() const {
69 return document_element_available_; 69 return document_element_available_;
70 } 70 }
71 71
72 // Sets the the ViewType of this host (e.g. mole, toolstrip).
73 void SetRenderViewType(ViewType::Type type);
74
72 // Returns true if the render view is initialized and didn't crash. 75 // Returns true if the render view is initialized and didn't crash.
73 bool IsRenderViewLive() const; 76 bool IsRenderViewLive() const;
74 77
75 // Initializes our RenderViewHost by creating its RenderView and navigating 78 // Initializes our RenderViewHost by creating its RenderView and navigating
76 // to this host's url. Uses host_view for the RenderViewHost's view (can be 79 // to this host's url. Uses host_view for the RenderViewHost's view (can be
77 // NULL). 80 // NULL).
78 void CreateRenderView(RenderWidgetHostView* host_view); 81 void CreateRenderView(RenderWidgetHostView* host_view);
79 82
80 // Sets |url_| and navigates |render_view_host_|. 83 // Sets |url_| and navigates |render_view_host_|.
81 void NavigateToURL(const GURL& url); 84 void NavigateToURL(const GURL& url);
82 85
83 // Insert the CSS for a toolstrip. 86 // Insert the theme CSS for a toolstrip/mole.
84 void InsertCssIfToolstrip(); 87 void InsertThemeCSS();
85 88
86 // RenderViewHostDelegate implementation. 89 // RenderViewHostDelegate implementation.
87 virtual RenderViewHostDelegate::View* GetViewDelegate(); 90 virtual RenderViewHostDelegate::View* GetViewDelegate();
88 virtual const GURL& GetURL() const { return url_; } 91 virtual const GURL& GetURL() const { return url_; }
89 virtual void RenderViewCreated(RenderViewHost* render_view_host); 92 virtual void RenderViewCreated(RenderViewHost* render_view_host);
90 virtual ViewType::Type GetRenderViewType() const; 93 virtual ViewType::Type GetRenderViewType() const;
91 virtual int GetBrowserWindowID() const; 94 virtual int GetBrowserWindowID() const;
92 virtual void RenderViewGone(RenderViewHost* render_view_host); 95 virtual void RenderViewGone(RenderViewHost* render_view_host);
93 virtual void DidNavigate(RenderViewHost* render_view_host, 96 virtual void DidNavigate(RenderViewHost* render_view_host,
94 const ViewHostMsg_FrameNavigate_Params& params); 97 const ViewHostMsg_FrameNavigate_Params& params);
95 virtual void DidStopLoading(RenderViewHost* render_view_host); 98 virtual void DidStopLoading(RenderViewHost* render_view_host);
96 virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host); 99 virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host);
97 100
98 virtual WebPreferences GetWebkitPrefs(); 101 virtual WebPreferences GetWebkitPrefs();
99 virtual void ProcessDOMUIMessage(const std::string& message, 102 virtual void ProcessDOMUIMessage(const std::string& message,
100 const std::string& content, 103 const std::string& content,
101 int request_id, 104 int request_id,
102 bool has_callback); 105 bool has_callback);
103 virtual void RunJavaScriptMessage(const std::wstring& message, 106 virtual void RunJavaScriptMessage(const std::wstring& message,
104 const std::wstring& default_prompt, 107 const std::wstring& default_prompt,
105 const GURL& frame_url, 108 const GURL& frame_url,
106 const int flags, 109 const int flags,
107 IPC::Message* reply_msg, 110 IPC::Message* reply_msg,
108 bool* did_suppress_message); 111 bool* did_suppress_message);
109 virtual void DidInsertCSS();
110 112
111 // RenderViewHostDelegate::View 113 // RenderViewHostDelegate::View
112 virtual void CreateNewWindow(int route_id, 114 virtual void CreateNewWindow(int route_id,
113 base::WaitableEvent* modal_dialog_event); 115 base::WaitableEvent* modal_dialog_event);
114 virtual void CreateNewWidget(int route_id, bool activatable); 116 virtual void CreateNewWidget(int route_id, bool activatable);
115 virtual void ShowCreatedWindow(int route_id, 117 virtual void ShowCreatedWindow(int route_id,
116 WindowOpenDisposition disposition, 118 WindowOpenDisposition disposition,
117 const gfx::Rect& initial_pos, 119 const gfx::Rect& initial_pos,
118 bool user_gesture, 120 bool user_gesture,
119 const GURL& creator_url); 121 const GURL& creator_url);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; 188 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
187 189
188 // Only EXTENSION_TOOLSTRIP and EXTENSION_BACKGROUND_PAGE are used here, 190 // Only EXTENSION_TOOLSTRIP and EXTENSION_BACKGROUND_PAGE are used here,
189 // others are not hostd by ExtensionHost. 191 // others are not hostd by ExtensionHost.
190 ViewType::Type extension_host_type_; 192 ViewType::Type extension_host_type_;
191 193
192 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 194 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
193 }; 195 };
194 196
195 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 197 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698