f98454e5dd
* Initial changes to use crashpad for windows * Remove crashpad patch * Report error when failed to connect pipe * Allow crashpad to communicate with named pipe * Add patch to make crashpad named pipe work * Windows also needs crashReporter on main process * Call SetUnhandledExceptionFilter in node process Node can also use crash reporter. * Do not treat node process as browser process * No more need to manually start crash service * Use base::StringPrintf for better readbility * Print error when pipe name not available * Make sure pipe name is updated Note that the crashpad may be started after renderer process gets created. * Fix some tests * Update node * Exclude crashpad files on Linux and MAS * Fix lint warning * Remove unused checks * kCrashpadPipeName is only available on Windows * Fix uploadToServer tests * Fix extra params tests * Fix getCrashesDirectory tests * Run crashReporter tests on CI * Style fixes * Update crashreporter docs * Rename InitBreakpad to Init * Add comment for process_type_.empty() and UTF16ToASCII to UTF16ToUTF8. * Update build.gn include crashpad headers * Address comment https://github.com/electron/electron/pull/18483#discussion_r290887898 * Avoid using api::WebContents * Put kRunAsNode in atom_constants * Remove duplicate settings on upload params * Fix building on macOS * Update description for crashpad_pid_check.patch
66 lines
2.3 KiB
C++
66 lines
2.3 KiB
C++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
// Copyright (c) 2013 Adam Roben <adam@roben.org>. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE-CHROMIUM file.
|
|
|
|
#ifndef ATOM_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_
|
|
#define ATOM_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_
|
|
|
|
#include <string>
|
|
|
|
#include "content/public/browser/web_contents.h"
|
|
|
|
namespace base {
|
|
class Value;
|
|
}
|
|
|
|
namespace content {
|
|
class DevToolsAgentHost;
|
|
}
|
|
|
|
class PrefService;
|
|
|
|
namespace atom {
|
|
|
|
class InspectableWebContentsDelegate;
|
|
class InspectableWebContentsView;
|
|
|
|
// TODO(zcbenz): Remove this abstract wrapper and rename
|
|
// InspectableWebContentsImpl to InspectableWebContents instead.
|
|
class InspectableWebContents {
|
|
public:
|
|
// The returned InspectableWebContents takes ownership of the passed-in
|
|
// WebContents.
|
|
static InspectableWebContents* Create(content::WebContents* web_contents,
|
|
PrefService* pref_service,
|
|
bool is_guest);
|
|
|
|
virtual ~InspectableWebContents() {}
|
|
|
|
virtual InspectableWebContentsView* GetView() const = 0;
|
|
virtual content::WebContents* GetWebContents() const = 0;
|
|
virtual content::WebContents* GetDevToolsWebContents() const = 0;
|
|
|
|
// The delegate manages its own life.
|
|
virtual void SetDelegate(InspectableWebContentsDelegate* delegate) = 0;
|
|
virtual InspectableWebContentsDelegate* GetDelegate() const = 0;
|
|
|
|
virtual bool IsGuest() const = 0;
|
|
virtual void ReleaseWebContents() = 0;
|
|
virtual void SetDevToolsWebContents(content::WebContents* devtools) = 0;
|
|
virtual void SetDockState(const std::string& state) = 0;
|
|
virtual void ShowDevTools(bool activate) = 0;
|
|
virtual void CloseDevTools() = 0;
|
|
virtual bool IsDevToolsViewShowing() = 0;
|
|
virtual void AttachTo(scoped_refptr<content::DevToolsAgentHost>) = 0;
|
|
virtual void Detach() = 0;
|
|
virtual void CallClientFunction(const std::string& function_name,
|
|
const base::Value* arg1 = nullptr,
|
|
const base::Value* arg2 = nullptr,
|
|
const base::Value* arg3 = nullptr) = 0;
|
|
virtual void InspectElement(int x, int y) = 0;
|
|
};
|
|
|
|
} // namespace atom
|
|
|
|
#endif // ATOM_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_
|