mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: remove redundant resizing strategy equality check (#38619)
* refactor: remove redundant resizing strategy equality check Upstream already checks this. Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: remove devtools_settings.h from iwc header Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: remove unused <vectro> from iwc header Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/prefs/scoped_user_pref_update.h"
|
||||
@@ -632,13 +633,8 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() {
|
||||
#endif
|
||||
|
||||
void InspectableWebContents::SetInspectedPageBounds(const gfx::Rect& rect) {
|
||||
DevToolsContentsResizingStrategy strategy(rect);
|
||||
if (contents_resizing_strategy_.Equals(strategy))
|
||||
return;
|
||||
|
||||
contents_resizing_strategy_.CopyFrom(strategy);
|
||||
if (managed_devtools_web_contents_)
|
||||
view_->SetContentsResizingStrategy(contents_resizing_strategy_);
|
||||
view_->SetContentsResizingStrategy(DevToolsContentsResizingStrategy{rect});
|
||||
}
|
||||
|
||||
void InspectableWebContents::InspectElementCompleted() {}
|
||||
|
||||
@@ -11,14 +11,11 @@
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/containers/unique_ptr_adapters.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
|
||||
#include "chrome/browser/devtools/devtools_embedder_message_dispatcher.h"
|
||||
#include "chrome/browser/devtools/devtools_settings.h"
|
||||
#include "content/public/browser/devtools_agent_host.h"
|
||||
#include "content/public/browser/devtools_frontend_host.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
@@ -205,7 +202,6 @@ class InspectableWebContents
|
||||
void AddDevToolsExtensionsToClient();
|
||||
#endif
|
||||
|
||||
DevToolsContentsResizingStrategy contents_resizing_strategy_;
|
||||
gfx::Rect devtools_bounds_;
|
||||
bool can_dock_ = true;
|
||||
std::string dock_state_;
|
||||
|
||||
Reference in New Issue
Block a user