OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_CSS_AGENT_H_ | 5 #ifndef ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_CSS_AGENT_H_ |
6 #define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_CSS_AGENT_H_ | 6 #define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_CSS_AGENT_H_ |
7 | 7 |
8 #include "ash/common/devtools/ash_devtools_dom_agent.h" | 8 #include "ash/common/devtools/ash_devtools_dom_agent.h" |
9 #include "components/ui_devtools/CSS.h" | 9 #include "components/ui_devtools/CSS.h" |
10 #include "ui/views/widget/widget_observer.h" | 10 #include "ui/views/widget/widget_observer.h" |
(...skipping 25 matching lines...) Expand all Loading... | |
36 | 36 |
37 // AshDevToolsDOMAgentObserver | 37 // AshDevToolsDOMAgentObserver |
38 void OnWindowBoundsChanged(WmWindow* window) override; | 38 void OnWindowBoundsChanged(WmWindow* window) override; |
39 void OnWidgetBoundsChanged(views::Widget* widget) override; | 39 void OnWidgetBoundsChanged(views::Widget* widget) override; |
40 void OnViewBoundsChanged(views::View* view) override; | 40 void OnViewBoundsChanged(views::View* view) override; |
41 | 41 |
42 private: | 42 private: |
43 std::unique_ptr<ui::devtools::protocol::CSS::CSSStyle> GetStylesForNode( | 43 std::unique_ptr<ui::devtools::protocol::CSS::CSSStyle> GetStylesForNode( |
44 int node_id); | 44 int node_id); |
45 void InvalidateStyleSheet(int node_id); | 45 void InvalidateStyleSheet(int node_id); |
46 bool GetBoundsForNodeId(int node_id, gfx::Rect* bounds); | 46 bool GetNodeIdProperties(int node_id, gfx::Rect* bounds, bool* visible); |
varkha
2017/03/08 15:23:59
GetPropertiesForNodeId
thanhph
2017/03/09 16:30:58
Done.
| |
47 bool UpdateBounds(int node_id, const gfx::Rect& bounds); | 47 bool UpdateObjectProperties(int node_id, |
varkha
2017/03/08 15:23:59
[Set|Update]PropertiesForNodeId
thanhph
2017/03/09 16:30:58
Done, I use SetPropertiesForNodeId(). Thanks!
| |
48 const gfx::Rect& bounds, | |
49 const bool& visible); | |
50 ui::devtools::protocol::Response ParseProperties( | |
51 const std::string& style_text, | |
52 gfx::Rect* bounds, | |
53 bool* visible); | |
varkha
2017/03/08 15:23:59
What was the reason to make this into a class meth
thanhph
2017/03/09 16:30:58
Yes it uses |this->dom_agent_| to retrieve either
| |
48 | 54 |
49 AshDevToolsDOMAgent* dom_agent_; | 55 AshDevToolsDOMAgent* dom_agent_; |
50 | 56 |
51 DISALLOW_COPY_AND_ASSIGN(AshDevToolsCSSAgent); | 57 DISALLOW_COPY_AND_ASSIGN(AshDevToolsCSSAgent); |
52 }; | 58 }; |
53 | 59 |
54 } // namespace devtools | 60 } // namespace devtools |
55 } // namespace ash | 61 } // namespace ash |
56 | 62 |
57 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_CSS_AGENT_H_ | 63 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_CSS_AGENT_H_ |
OLD | NEW |