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

Side by Side Diff: chrome/renderer/extensions/extension_helper.h

Issue 10534147: Allow platform apps to open links in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 8 years, 6 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) 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_EXTENSIONS_EXTENSION_HELPER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/common/view_type.h" 14 #include "chrome/common/view_type.h"
15 #include "content/public/common/console_message_level.h"
15 #include "content/public/renderer/render_view_observer.h" 16 #include "content/public/renderer/render_view_observer.h"
16 #include "content/public/renderer/render_view_observer_tracker.h" 17 #include "content/public/renderer/render_view_observer_tracker.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h"
18 19
19 class ExtensionDispatcher; 20 class ExtensionDispatcher;
20 class GURL; 21 class GURL;
21 class SkBitmap; 22 class SkBitmap;
22 struct ExtensionMsg_ExecuteCode_Params; 23 struct ExtensionMsg_ExecuteCode_Params;
23 struct WebApplicationInfo; 24 struct WebApplicationInfo;
24 25
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const std::string& source_extension_id, 89 const std::string& source_extension_id,
89 const std::string& target_extension_id); 90 const std::string& target_extension_id);
90 void OnExtensionDeliverMessage(int target_port_id, 91 void OnExtensionDeliverMessage(int target_port_id,
91 const std::string& message); 92 const std::string& message);
92 void OnExtensionDispatchOnDisconnect(int port_id, bool connection_error); 93 void OnExtensionDispatchOnDisconnect(int port_id, bool connection_error);
93 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params); 94 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params);
94 void OnGetApplicationInfo(int page_id); 95 void OnGetApplicationInfo(int page_id);
95 void OnNotifyRendererViewType(chrome::ViewType view_type); 96 void OnNotifyRendererViewType(chrome::ViewType view_type);
96 void OnSetTabId(int tab_id); 97 void OnSetTabId(int tab_id);
97 void OnUpdateBrowserWindowId(int window_id); 98 void OnUpdateBrowserWindowId(int window_id);
99 void OnAddMessageToConsole(content::ConsoleMessageLevel level,
100 const std::string& message);
98 101
99 // Callback triggered when we finish downloading the application definition 102 // Callback triggered when we finish downloading the application definition
100 // file. 103 // file.
101 void DidDownloadApplicationDefinition(const WebKit::WebURLResponse& response, 104 void DidDownloadApplicationDefinition(const WebKit::WebURLResponse& response,
102 const std::string& data); 105 const std::string& data);
103 106
104 // Callback triggered after each icon referenced by the application definition 107 // Callback triggered after each icon referenced by the application definition
105 // is downloaded. 108 // is downloaded.
106 void DidDownloadApplicationIcon(webkit_glue::ImageResourceFetcher* fetcher, 109 void DidDownloadApplicationIcon(webkit_glue::ImageResourceFetcher* fetcher,
107 const SkBitmap& image); 110 const SkBitmap& image);
108 111
109 // Helper to add an error message to the root frame's console. 112 // Helper to add an logging message to the root frame's console.
110 void AddErrorToRootConsole(const string16& message); 113 void AddMessageToRootConsole(content::ConsoleMessageLevel level,
114 const string16& message);
111 115
112 ExtensionDispatcher* extension_dispatcher_; 116 ExtensionDispatcher* extension_dispatcher_;
113 117
114 // The app info that we are processing. This is used when installing an app 118 // The app info that we are processing. This is used when installing an app
115 // via application definition. The in-progress web app is stored here while 119 // via application definition. The in-progress web app is stored here while
116 // its manifest and icons are downloaded. 120 // its manifest and icons are downloaded.
117 scoped_ptr<WebApplicationInfo> pending_app_info_; 121 scoped_ptr<WebApplicationInfo> pending_app_info_;
118 122
119 // Used to download the application definition file. 123 // Used to download the application definition file.
120 scoped_ptr<webkit_glue::ResourceFetcher> app_definition_fetcher_; 124 scoped_ptr<webkit_glue::ResourceFetcher> app_definition_fetcher_;
(...skipping 13 matching lines...) Expand all
134 // Id of the tab which the RenderView is attached to. 138 // Id of the tab which the RenderView is attached to.
135 int tab_id_; 139 int tab_id_;
136 140
137 // Id number of browser window which RenderView is attached to. 141 // Id number of browser window which RenderView is attached to.
138 int browser_window_id_; 142 int browser_window_id_;
139 143
140 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); 144 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper);
141 }; 145 };
142 146
143 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 147 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/extension_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698