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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.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_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" 10 #include "chrome/browser/extensions/extension_function_dispatcher.h"
11 #include "chrome/browser/sessions/session_id.h" 11 #include "chrome/browser/sessions/session_id.h"
12 #include "chrome/browser/ui/base_window.h" 12 #include "chrome/browser/ui/base_window.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "content/public/browser/web_contents_delegate.h" 15 #include "content/public/browser/web_contents_delegate.h"
16 #include "content/public/browser/web_contents_observer.h" 16 #include "content/public/browser/web_contents_observer.h"
17 #include "content/public/common/console_message_level.h"
17 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
18 19
19 class ExtensionWindowController; 20 class ExtensionWindowController;
20 class GURL; 21 class GURL;
21 class Profile; 22 class Profile;
22 class TabContents; 23 class TabContents;
23 24
24 namespace content { 25 namespace content {
25 class WebContents; 26 class WebContents;
26 } 27 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 virtual void NavigationStateChanged(const content::WebContents* source, 112 virtual void NavigationStateChanged(const content::WebContents* source,
112 unsigned changed_flags) OVERRIDE; 113 unsigned changed_flags) OVERRIDE;
113 virtual void ToggleFullscreenModeForTab(content::WebContents* source, 114 virtual void ToggleFullscreenModeForTab(content::WebContents* source,
114 bool enter_fullscreen) OVERRIDE; 115 bool enter_fullscreen) OVERRIDE;
115 virtual bool IsFullscreenForTabOrPending( 116 virtual bool IsFullscreenForTabOrPending(
116 const content::WebContents* source) const OVERRIDE; 117 const content::WebContents* source) const OVERRIDE;
117 virtual void RequestMediaAccessPermission( 118 virtual void RequestMediaAccessPermission(
118 content::WebContents* web_contents, 119 content::WebContents* web_contents,
119 const content::MediaStreamRequest* request, 120 const content::MediaStreamRequest* request,
120 const content::MediaResponseCallback& callback) OVERRIDE; 121 const content::MediaResponseCallback& callback) OVERRIDE;
122 virtual content::WebContents* OpenURLFromTab(
123 content::WebContents* source,
124 const content::OpenURLParams& params) OVERRIDE;
125 virtual void AddNewContents(content::WebContents* source,
126 content::WebContents* new_contents,
127 WindowOpenDisposition disposition,
128 const gfx::Rect& initial_pos,
129 bool user_gesture) OVERRIDE;
121 130
122 // content::NotificationObserver implementation. 131 // content::NotificationObserver implementation.
123 virtual void Observe(int type, 132 virtual void Observe(int type,
124 const content::NotificationSource& source, 133 const content::NotificationSource& source,
125 const content::NotificationDetails& details) OVERRIDE; 134 const content::NotificationDetails& details) OVERRIDE;
126 135
127 // ExtensionFunctionDispatcher::Delegate implementation. 136 // ExtensionFunctionDispatcher::Delegate implementation.
128 virtual ExtensionWindowController* GetExtensionWindowController() const 137 virtual ExtensionWindowController* GetExtensionWindowController() const
129 OVERRIDE; 138 OVERRIDE;
130 139
131 // Message handlers. 140 // Message handlers.
132 void OnRequest(const ExtensionHostMsg_Request_Params& params); 141 void OnRequest(const ExtensionHostMsg_Request_Params& params);
133 142
143 // Helper method to add a message to the renderer's DevTools console.
144 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level,
145 const std::string& message);
146
134 Profile* profile_; // weak pointer - owned by ProfileManager. 147 Profile* profile_; // weak pointer - owned by ProfileManager.
135 // weak pointer - owned by ExtensionService. 148 // weak pointer - owned by ExtensionService.
136 const extensions::Extension* extension_; 149 const extensions::Extension* extension_;
137 150
138 const SessionID session_id_; 151 const SessionID session_id_;
139 scoped_ptr<TabContents> contents_; 152 scoped_ptr<TabContents> contents_;
140 // web_contents_ is owned by contents_. 153 // web_contents_ is owned by contents_.
141 content::WebContents* web_contents_; 154 content::WebContents* web_contents_;
142 content::NotificationRegistrar registrar_; 155 content::NotificationRegistrar registrar_;
143 ExtensionFunctionDispatcher extension_function_dispatcher_; 156 ExtensionFunctionDispatcher extension_function_dispatcher_;
144 157
145 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 158 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
146 }; 159 };
147 160
148 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 161 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698