OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_DEBUGGER_DEV_TOOLS_VIEW_H_ |
| 6 #define CHROME_BROWSER_DEBUGGER_DEV_TOOLS_VIEW_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/gfx/size.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
| 13 #include "chrome/views/view.h" |
| 14 |
| 15 namespace IPC { |
| 16 class Message; |
| 17 } |
| 18 class TabContentsContainerView; |
| 19 class WebContents; |
| 20 |
| 21 class DevToolsView : public views::View, |
| 22 public TabContentsDelegate { |
| 23 public: |
| 24 explicit DevToolsView(int inspected_process_id, int inspected_view_id); |
| 25 virtual ~DevToolsView(); |
| 26 |
| 27 void SendDevToolsClientMessage(const IPC::Message& message); |
| 28 |
| 29 // Destroy content views when the window is closing. |
| 30 void OnWindowClosing(); |
| 31 |
| 32 private: |
| 33 // Overridden from TabContentsDelegate: |
| 34 virtual void NavigationStateChanged(const TabContents* source, |
| 35 unsigned changed_flags) {} |
| 36 virtual void ReplaceContents(TabContents* source, |
| 37 TabContents* new_contents) {} |
| 38 virtual void AddNewContents(TabContents* source, |
| 39 TabContents* new_contents, |
| 40 WindowOpenDisposition disposition, |
| 41 const gfx::Rect& initial_pos, |
| 42 bool user_gesture) {} |
| 43 virtual void ActivateContents(TabContents* contents) {} |
| 44 virtual void LoadingStateChanged(TabContents* source) {} |
| 45 virtual void CloseContents(TabContents* source) {} |
| 46 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} |
| 47 virtual bool IsPopup(TabContents* source) { return false; } |
| 48 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} |
| 49 virtual void URLStarredChanged(TabContents* source, bool) {} |
| 50 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} |
| 51 virtual bool CanBlur() const { return false; } |
| 52 |
| 53 // Opens a new URL inside the passed in TabContents, if source is 0 open |
| 54 // in the current front-most tab. |
| 55 virtual void OpenURLFromTab(TabContents* source, |
| 56 const GURL& url, const GURL& referrer, |
| 57 WindowOpenDisposition disposition, |
| 58 PageTransition::Type transition); |
| 59 |
| 60 // Overridden from views::View: |
| 61 virtual std::string GetClassName() const; |
| 62 virtual gfx::Size GetPreferredSize(); |
| 63 virtual void Layout(); |
| 64 virtual void ViewHierarchyChanged(bool is_add, |
| 65 views::View* parent, |
| 66 views::View* child); |
| 67 |
| 68 void Init(); |
| 69 |
| 70 const int inspected_process_id_; |
| 71 const int inspected_view_id_; |
| 72 WebContents* web_contents_; |
| 73 TabContentsContainerView* web_container_; |
| 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(DevToolsView); |
| 76 }; |
| 77 |
| 78 #endif // CHROME_BROWSER_DEBUGGER_DEV_TOOLS_VIEW_H_ |
| 79 |
OLD | NEW |