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

Side by Side Diff: extensions/shell/browser/shell_app_delegate.h

Issue 754313003: app_shell: Fix focus on opening new app windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_
7 7
8 #include "extensions/browser/app_window/app_delegate.h" 8 #include "extensions/browser/app_window/app_delegate.h"
9 #include "content/public/browser/web_contents_observer.h"
9 10
10 namespace extensions { 11 namespace extensions {
11 12
12 // app_shell's AppDelegate implementation. 13 // AppDelegate implementation for app_shell. Sets focus after the WebContents is
13 class ShellAppDelegate : public AppDelegate { 14 // created. Ignores most operations that would create a new dialog or window.
15 class ShellAppDelegate : public AppDelegate,
16 public content::WebContentsObserver {
14 public: 17 public:
15 ShellAppDelegate(); 18 ShellAppDelegate();
16 ~ShellAppDelegate() override; 19 ~ShellAppDelegate() override;
17 20
18 // AppDelegate overrides: 21 // AppDelegate overrides:
19 void InitWebContents(content::WebContents* web_contents) override; 22 void InitWebContents(content::WebContents* web_contents) override;
20 void ResizeWebContents(content::WebContents* web_contents, 23 void ResizeWebContents(content::WebContents* web_contents,
21 const gfx::Size& size) override; 24 const gfx::Size& size) override;
22 content::WebContents* OpenURLFromTab( 25 content::WebContents* OpenURLFromTab(
23 content::BrowserContext* context, 26 content::BrowserContext* context,
(...skipping 17 matching lines...) Expand all
41 bool CheckMediaAccessPermission(content::WebContents* web_contents, 44 bool CheckMediaAccessPermission(content::WebContents* web_contents,
42 const GURL& security_origin, 45 const GURL& security_origin,
43 content::MediaStreamType type, 46 content::MediaStreamType type,
44 const Extension* extension) override; 47 const Extension* extension) override;
45 int PreferredIconSize() override; 48 int PreferredIconSize() override;
46 void SetWebContentsBlocked(content::WebContents* web_contents, 49 void SetWebContentsBlocked(content::WebContents* web_contents,
47 bool blocked) override; 50 bool blocked) override;
48 bool IsWebContentsVisible(content::WebContents* web_contents) override; 51 bool IsWebContentsVisible(content::WebContents* web_contents) override;
49 void SetTerminatingCallback(const base::Closure& callback) override; 52 void SetTerminatingCallback(const base::Closure& callback) override;
50 53
54 // content::WebContentsObserver:
55 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
56
51 private: 57 private:
52 DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate); 58 DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate);
53 }; 59 };
54 60
55 } // namespace extensions 61 } // namespace extensions
56 62
57 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ 63 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/shell/browser/shell_app_delegate.cc » ('j') | extensions/shell/browser/shell_app_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698