OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 namespace blink { | 94 namespace blink { |
95 | 95 |
96 namespace { | 96 namespace { |
97 | 97 |
98 bool IsMainFrame(WebLocalFrameBase* frame) { | 98 bool IsMainFrame(WebLocalFrameBase* frame) { |
99 // TODO(dgozman): sometimes view->mainFrameImpl() does return null, even | 99 // TODO(dgozman): sometimes view->mainFrameImpl() does return null, even |
100 // though |frame| is meant to be main frame. See http://crbug.com/526162. | 100 // though |frame| is meant to be main frame. See http://crbug.com/526162. |
101 return frame->ViewImpl() && !frame->Parent(); | 101 return frame->ViewImpl() && !frame->Parent(); |
102 } | 102 } |
103 } | 103 } // namespace |
104 | 104 |
105 class ClientMessageLoopAdapter : public MainThreadDebugger::ClientMessageLoop { | 105 class ClientMessageLoopAdapter : public MainThreadDebugger::ClientMessageLoop { |
106 public: | 106 public: |
107 ~ClientMessageLoopAdapter() override { instance_ = nullptr; } | 107 ~ClientMessageLoopAdapter() override { instance_ = nullptr; } |
108 | 108 |
109 static void EnsureMainThreadDebuggerCreated(WebDevToolsAgentClient* client) { | 109 static void EnsureMainThreadDebuggerCreated(WebDevToolsAgentClient* client) { |
110 if (instance_) | 110 if (instance_) |
111 return; | 111 return; |
112 std::unique_ptr<ClientMessageLoopAdapter> instance = | 112 std::unique_ptr<ClientMessageLoopAdapter> instance = |
113 WTF::WrapUnique(new ClientMessageLoopAdapter( | 113 WTF::WrapUnique(new ClientMessageLoopAdapter( |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 670 } |
671 | 671 |
672 bool WebDevToolsAgent::ShouldInterruptForMethod(const WebString& method) { | 672 bool WebDevToolsAgent::ShouldInterruptForMethod(const WebString& method) { |
673 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || | 673 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || |
674 method == "Debugger.setBreakpointByUrl" || | 674 method == "Debugger.setBreakpointByUrl" || |
675 method == "Debugger.removeBreakpoint" || | 675 method == "Debugger.removeBreakpoint" || |
676 method == "Debugger.setBreakpointsActive"; | 676 method == "Debugger.setBreakpointsActive"; |
677 } | 677 } |
678 | 678 |
679 } // namespace blink | 679 } // namespace blink |
OLD | NEW |