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

Side by Side Diff: chrome/browser/devtools/devtools_toggle_action.h

Issue 108213012: [DevTools] Remove dock side knowledge from browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_DEVTOOLS_DEVTOOLS_TOGGLE_ACTION_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TOGGLE_ACTION_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TOGGLE_ACTION_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TOGGLE_ACTION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 11
12 struct DevToolsToggleAction { 12 struct DevToolsToggleAction {
13 public: 13 public:
14 enum Type { 14 enum Type {
15 kShow, 15 kShow,
16 kShowConsole, 16 kShowConsole,
17 kInspect, 17 kInspect,
18 kToggle, 18 kToggle,
19 kReveal 19 kReveal,
20 kNothing
20 }; 21 };
21 22
22 struct RevealParams { 23 struct RevealParams {
23 RevealParams(const base::string16& url, 24 RevealParams(const base::string16& url,
24 size_t line_number, 25 size_t line_number,
25 size_t column_number); 26 size_t column_number);
26 ~RevealParams(); 27 ~RevealParams();
27 28
28 base::string16 url; 29 base::string16 url;
29 size_t line_number; 30 size_t line_number;
30 size_t column_number; 31 size_t column_number;
31 }; 32 };
32 33
33 void operator=(const DevToolsToggleAction& rhs); 34 void operator=(const DevToolsToggleAction& rhs);
34 DevToolsToggleAction(const DevToolsToggleAction& rhs); 35 DevToolsToggleAction(const DevToolsToggleAction& rhs);
35 ~DevToolsToggleAction(); 36 ~DevToolsToggleAction();
36 37
37 static DevToolsToggleAction Show(); 38 static DevToolsToggleAction Show();
38 static DevToolsToggleAction ShowConsole(); 39 static DevToolsToggleAction ShowConsole();
39 static DevToolsToggleAction Inspect(); 40 static DevToolsToggleAction Inspect();
40 static DevToolsToggleAction Toggle(); 41 static DevToolsToggleAction Toggle();
41 static DevToolsToggleAction Reveal(const base::string16& url, 42 static DevToolsToggleAction Reveal(const base::string16& url,
42 size_t line_number, 43 size_t line_number,
43 size_t column_number); 44 size_t column_number);
45 static DevToolsToggleAction Nothing();
44 46
45 Type type() const { return type_; } 47 Type type() const { return type_; }
46 const RevealParams* params() const { return params_.get(); } 48 const RevealParams* params() const { return params_.get(); }
47 49
48 private: 50 private:
49 explicit DevToolsToggleAction(Type type); 51 explicit DevToolsToggleAction(Type type);
50 explicit DevToolsToggleAction(RevealParams* reveal_params); 52 explicit DevToolsToggleAction(RevealParams* reveal_params);
51 53
52 // The type of action. 54 // The type of action.
53 Type type_; 55 Type type_;
54 56
55 // Additional parameters for the Reveal action; NULL if of any other type. 57 // Additional parameters for the Reveal action; NULL if of any other type.
56 scoped_ptr<RevealParams> params_; 58 scoped_ptr<RevealParams> params_;
57 }; 59 };
58 60
59 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TOGGLE_ACTION_H_ 61 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TOGGLE_ACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698