| OLD | NEW |
| 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" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 views::Widget::InitParams* params, | 56 views::Widget::InitParams* params, |
| 57 views::internal::NativeWidgetDelegate* delegate) override; | 57 views::internal::NativeWidgetDelegate* delegate) override; |
| 58 ui::ContextFactory* GetContextFactory() override; | 58 ui::ContextFactory* GetContextFactory() override; |
| 59 ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; | 59 ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; |
| 60 std::string GetApplicationName() override; | 60 std::string GetApplicationName() override; |
| 61 scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner() override; | 61 scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner() override; |
| 62 | 62 |
| 63 gfx::Insets GetInsetsMetric(views::InsetsMetric metric) const override; | 63 gfx::Insets GetInsetsMetric(views::InsetsMetric metric) const override; |
| 64 int GetDistanceMetric(views::DistanceMetric metric) const override; | 64 int GetDistanceMetric(views::DistanceMetric metric) const override; |
| 65 const views::TypographyProvider& GetTypographyProvider() const override; | 65 const views::TypographyProvider& GetTypographyProvider() const override; |
| 66 int GetSnappedDialogWidth(int width) const override; |
| 66 | 67 |
| 67 static int GetDefaultDistanceMetric(views::DistanceMetric metric); | 68 static int GetDefaultDistanceMetric(views::DistanceMetric metric); |
| 68 | 69 |
| 69 private: | 70 private: |
| 70 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
| 71 typedef std::map<HMONITOR, int> AppbarAutohideEdgeMap; | 72 typedef std::map<HMONITOR, int> AppbarAutohideEdgeMap; |
| 72 | 73 |
| 73 // Callback on main thread with the edges. |returned_edges| is the value that | 74 // Callback on main thread with the edges. |returned_edges| is the value that |
| 74 // was returned from the call to GetAutohideEdges() that initiated the lookup. | 75 // was returned from the call to GetAutohideEdges() that initiated the lookup. |
| 75 void OnGotAppbarAutohideEdges(const base::Closure& callback, | 76 void OnGotAppbarAutohideEdges(const base::Closure& callback, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // GetAutohideEdges().start a new query. | 109 // GetAutohideEdges().start a new query. |
| 109 bool in_autohide_edges_callback_; | 110 bool in_autohide_edges_callback_; |
| 110 | 111 |
| 111 base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_; | 112 base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_; |
| 112 #endif | 113 #endif |
| 113 | 114 |
| 114 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); | 115 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ | 118 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ |
| OLD | NEW |