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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.h

Issue 1803143002: Replace BrowserProces::AddRefModule/RemoveModule by ScopedKeepAlive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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
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_VIEWS_CHROME_VIEWS_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "ui/accessibility/ax_enums.h" 13 #include "ui/accessibility/ax_enums.h"
14 #include "ui/views/views_delegate.h" 14 #include "ui/views/views_delegate.h"
15 15
16 class ScopedKeepAlive;
17
16 class ChromeViewsDelegate : public views::ViewsDelegate { 18 class ChromeViewsDelegate : public views::ViewsDelegate {
17 public: 19 public:
18 ChromeViewsDelegate(); 20 ChromeViewsDelegate();
19 ~ChromeViewsDelegate() override; 21 ~ChromeViewsDelegate() override;
20 22
21 // views::ViewsDelegate: 23 // views::ViewsDelegate:
22 void SaveWindowPlacement(const views::Widget* window, 24 void SaveWindowPlacement(const views::Widget* window,
23 const std::string& window_name, 25 const std::string& window_name,
24 const gfx::Rect& bounds, 26 const gfx::Rect& bounds,
25 ui::WindowShowState show_state) override; 27 ui::WindowShowState show_state) override;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 HMONITOR monitor, 71 HMONITOR monitor,
70 int returned_edges, 72 int returned_edges,
71 int edges); 73 int edges);
72 #endif 74 #endif
73 75
74 // Function to retrieve default opacity value mainly based on platform 76 // Function to retrieve default opacity value mainly based on platform
75 // and desktop context. 77 // and desktop context.
76 views::Widget::InitParams::WindowOpacity GetOpacityForInitParams( 78 views::Widget::InitParams::WindowOpacity GetOpacityForInitParams(
77 const views::Widget::InitParams& params); 79 const views::Widget::InitParams& params);
78 80
81 scoped_ptr<ScopedKeepAlive> keep_alive_;
82
79 #if defined(OS_WIN) 83 #if defined(OS_WIN)
80 AppbarAutohideEdgeMap appbar_autohide_edge_map_; 84 AppbarAutohideEdgeMap appbar_autohide_edge_map_;
81 // If true we're in the process of notifying a callback from 85 // If true we're in the process of notifying a callback from
82 // GetAutohideEdges().start a new query. 86 // GetAutohideEdges().start a new query.
83 bool in_autohide_edges_callback_; 87 bool in_autohide_edges_callback_;
84 88
85 base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_; 89 base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_;
86 #endif 90 #endif
87 91
88 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); 92 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate);
89 }; 93 };
90 94
91 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ 95 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698