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

Unified Diff: chrome/browser/views/frame/embedded_non_client_view.h

Issue 10973: Test the feasibility of turning Chrome into a multi-process ActiveX control Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/views/frame/embedded_non_client_view.h
===================================================================
--- chrome/browser/views/frame/embedded_non_client_view.h (revision 0)
+++ chrome/browser/views/frame/embedded_non_client_view.h (revision 0)
@@ -0,0 +1,72 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_FRAME_EMBEDDED_NON_CLIENT_VIEW_H_
+#define CHROME_BROWSER_VIEWS_FRAME_EMBEDDED_NON_CLIENT_VIEW_H_
+
+#include "chrome/browser/views/frame/embedded_frame.h"
+#include "chrome/browser/views/tab_icon_view.h"
+#include "chrome/views/non_client_view.h"
+#include "chrome/views/button.h"
+
+class BrowserView;
+class EmbeddedFrame;
+class TabContents;
+class TabStrip;
+namespace views {
+class WindowResources;
+}
+
+class EmbeddedNonClientView : public views::NonClientView,
+ public views::BaseButton::ButtonListener,
+ public TabIconView::TabContentsProvider {
+ public:
+ // Constructs a non-client view for an EmbeddedFrame.
+ EmbeddedNonClientView(EmbeddedFrame* frame, BrowserView* browser_view);
+ virtual ~EmbeddedNonClientView();
+
+ protected:
+ // Overridden from TabIconView::TabContentsProvider:
+ virtual TabContents* GetCurrentTabContents();
+ virtual SkBitmap GetFavIcon();
+
+ // Overridden from views::BaseButton::ButtonListener:
+ virtual void ButtonPressed(views::BaseButton* sender);
+
+ // Overridden from views::NonClientView:
+ virtual gfx::Rect CalculateClientAreaBounds(int width, int height) const;
+ virtual gfx::Size CalculateWindowSizeForClientSize(int width,
+ int height) const;
+ virtual CPoint GetSystemMenuPoint() const;
+ virtual int NonClientHitTest(const gfx::Point& point);
+ virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask);
+ virtual void EnableClose(bool enable);
+ virtual void ResetWindowControls();
+
+ // Overridden from views::View:
+ virtual void Paint(ChromeCanvas* canvas);
+ virtual void Layout();
+ virtual gfx::Size GetPreferredSize();
+ virtual void ViewHierarchyChanged(bool is_add,
+ views::View* parent,
+ views::View* embedded);
+ virtual bool GetAccessibleRole(VARIANT* role);
+ virtual bool GetAccessibleName(std::wstring* name);
+ virtual void SetAccessibleName(const std::wstring& name);
+
+ private:
+ // The frame that hosts this view.
+ EmbeddedFrame* frame_;
+
+ // The BrowserView hosted within this View.
+ BrowserView* browser_view_;
+
+ // The accessible name of this view.
+ std::wstring accessible_name_;
+
+ DISALLOW_EVIL_CONSTRUCTORS(EmbeddedNonClientView);
+};
+
+#endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_EMBEDDED_NON_CLIENT_VIEW_H_
+
« no previous file with comments | « chrome/browser/views/frame/embedded_frame.cc ('k') | chrome/browser/views/frame/embedded_non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698