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

Side by Side Diff: trunk/src/chrome/browser/ui/views/apps/native_app_window_views.h

Issue 163913004: Revert 250826 "Remove Profile dependency from apps::ShellWindow" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_VIEWS_APPS_NATIVE_APP_WINDOW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_VIEWS_H_
7 7
8 #include "apps/shell_window.h" 8 #include "apps/shell_window.h"
9 #include "apps/ui/native_app_window.h" 9 #include "apps/ui/native_app_window.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/shell_integration.h" 22 #include "chrome/browser/shell_integration.h"
23 #endif 23 #endif
24 24
25 #if defined(USE_ASH) 25 #if defined(USE_ASH)
26 namespace ash { 26 namespace ash {
27 class ImmersiveFullscreenController; 27 class ImmersiveFullscreenController;
28 } 28 }
29 #endif 29 #endif
30 30
31 class ExtensionKeybindingRegistryViews; 31 class ExtensionKeybindingRegistryViews;
32 class Profile;
32 33
33 namespace apps { 34 namespace apps {
34 class ShellWindowFrameView; 35 class ShellWindowFrameView;
35 } 36 }
36 37
37 namespace content { 38 namespace content {
38 class BrowserContext;
39 class RenderViewHost; 39 class RenderViewHost;
40 class WebContents; 40 class WebContents;
41 } 41 }
42 42
43 namespace extensions { 43 namespace extensions {
44 class Extension; 44 class Extension;
45 } 45 }
46 46
47 namespace ui { 47 namespace ui {
48 class MenuModel; 48 class MenuModel;
(...skipping 20 matching lines...) Expand all
69 protected: 69 protected:
70 // Called before views::Widget::Init() to allow subclasses to customize 70 // Called before views::Widget::Init() to allow subclasses to customize
71 // the InitParams that would be passed. 71 // the InitParams that would be passed.
72 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, 72 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params,
73 views::Widget* widget); 73 views::Widget* widget);
74 74
75 // ui::BaseWindow implementation that subclasses may override. 75 // ui::BaseWindow implementation that subclasses may override.
76 virtual void Show() OVERRIDE; 76 virtual void Show() OVERRIDE;
77 virtual void Activate() OVERRIDE; 77 virtual void Activate() OVERRIDE;
78 78
79 content::BrowserContext* browser_context() { 79 Profile* profile() { return shell_window_->profile(); }
80 return shell_window_->browser_context();
81 }
82
83 const extensions::Extension* extension() { 80 const extensions::Extension* extension() {
84 return shell_window_->extension(); 81 return shell_window_->extension();
85 } 82 }
86 83
87 private: 84 private:
88 friend class ShapedAppWindowTargeterTest; 85 friend class ShapedAppWindowTargeterTest;
89 86
90 void InitializeDefaultWindow( 87 void InitializeDefaultWindow(
91 const apps::ShellWindow::CreateParams& create_params); 88 const apps::ShellWindow::CreateParams& create_params);
92 void InitializePanelWindow( 89 void InitializePanelWindow(
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 240
244 base::WeakPtrFactory<NativeAppWindowViews> weak_ptr_factory_; 241 base::WeakPtrFactory<NativeAppWindowViews> weak_ptr_factory_;
245 242
246 // Used to show the system menu. 243 // Used to show the system menu.
247 scoped_ptr<views::MenuRunner> menu_runner_; 244 scoped_ptr<views::MenuRunner> menu_runner_;
248 245
249 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowViews); 246 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowViews);
250 }; 247 };
251 248
252 #endif // CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_VIEWS_H_ 249 #endif // CHROME_BROWSER_UI_VIEWS_APPS_NATIVE_APP_WINDOW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698