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

Side by Side Diff: chrome/browser/browser.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_BROWSER_H_ 5 #ifndef CHROME_BROWSER_BROWSER_H_
6 #define CHROME_BROWSER_BROWSER_H_ 6 #define CHROME_BROWSER_BROWSER_H_
7 7
8 #include "chrome/browser/controller.h" 8 #include "chrome/browser/controller.h"
9 #include "chrome/browser/shell_dialogs.h" 9 #include "chrome/browser/shell_dialogs.h"
10 #include "chrome/browser/browser_type.h" 10 #include "chrome/browser/browser_type.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // window is created by this function call. 47 // window is created by this function call.
48 static Browser* Create(Profile* profile); 48 static Browser* Create(Profile* profile);
49 49
50 // Like Create, but creates a tabstrip-less popup window. 50 // Like Create, but creates a tabstrip-less popup window.
51 static Browser* CreateForPopup(Profile* profile); 51 static Browser* CreateForPopup(Profile* profile);
52 52
53 // Like Create, but creates a tabstrip-less and toolbar-less "app" window for 53 // Like Create, but creates a tabstrip-less and toolbar-less "app" window for
54 // the specified app. 54 // the specified app.
55 static Browser* CreateForApp(const std::wstring& app_name, Profile* profile); 55 static Browser* CreateForApp(const std::wstring& app_name, Profile* profile);
56 56
57 // Like Create, but creates a window parented to another window.
58 static Browser* CreateForEmbedded(HWND parent_hwnd, gfx::Rect& rect, Profile* profile);
59
57 // Set overrides for the initial window bounds and maximized state. 60 // Set overrides for the initial window bounds and maximized state.
58 void set_override_bounds(const gfx::Rect& bounds) { 61 void set_override_bounds(const gfx::Rect& bounds) {
59 override_bounds_ = bounds; 62 override_bounds_ = bounds;
60 } 63 }
61 void set_override_maximized(bool maximized) { 64 void set_override_maximized(bool maximized) {
62 override_maximized_ = maximized; 65 override_maximized_ = maximized;
63 } 66 }
67 gfx::Rect override_bounds() const {
68 return override_bounds_;
69 }
70 void set_parent_hwnd(HWND hwnd) {
71 parent_hwnd_ = hwnd;
72 }
73 HWND parent_hwnd() const {
74 return parent_hwnd_;
75 }
64 76
65 // Creates the Browser Window. Prefer to use the static helpers above where 77 // Creates the Browser Window. Prefer to use the static helpers above where
66 // possible. This does not show the window. You need to call window()->Show() 78 // possible. This does not show the window. You need to call window()->Show()
67 // to show it. 79 // to show it.
68 void CreateBrowserWindow(); 80 void CreateBrowserWindow();
69 81
70 // Accessors //////////////////////////////////////////////////////////////// 82 // Accessors ////////////////////////////////////////////////////////////////
71 83
72 BrowserType::Type type() const { return type_; } 84 BrowserType::Type type() const { return type_; }
73 Profile* profile() const { return profile_; } 85 Profile* profile() const { return profile_; }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 virtual void AddNewContents(TabContents* source, 349 virtual void AddNewContents(TabContents* source,
338 TabContents* new_contents, 350 TabContents* new_contents,
339 WindowOpenDisposition disposition, 351 WindowOpenDisposition disposition,
340 const gfx::Rect& initial_pos, 352 const gfx::Rect& initial_pos,
341 bool user_gesture); 353 bool user_gesture);
342 virtual void ActivateContents(TabContents* contents); 354 virtual void ActivateContents(TabContents* contents);
343 virtual void LoadingStateChanged(TabContents* source); 355 virtual void LoadingStateChanged(TabContents* source);
344 virtual void CloseContents(TabContents* source); 356 virtual void CloseContents(TabContents* source);
345 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); 357 virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
346 virtual bool IsPopup(TabContents* source); 358 virtual bool IsPopup(TabContents* source);
359 virtual bool IsEmbedded(TabContents* source);
347 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); 360 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating);
348 virtual void URLStarredChanged(TabContents* source, bool starred); 361 virtual void URLStarredChanged(TabContents* source, bool starred);
349 362
350 virtual void ContentsMouseEvent(TabContents* source, UINT message); 363 virtual void ContentsMouseEvent(TabContents* source, UINT message);
351 virtual void UpdateTargetURL(TabContents* source, const GURL& url); 364 virtual void UpdateTargetURL(TabContents* source, const GURL& url);
352 365
353 virtual void ContentsZoomChange(bool zoom_in); 366 virtual void ContentsZoomChange(bool zoom_in);
354 virtual bool IsApplication() const; 367 virtual bool IsApplication() const;
355 virtual void ConvertContentsToApplication(TabContents* source); 368 virtual void ConvertContentsToApplication(TabContents* source);
356 virtual void ContentsStateChanged(TabContents* source); 369 virtual void ContentsStateChanged(TabContents* source);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 601
589 // Dialog box used for opening and saving files. 602 // Dialog box used for opening and saving files.
590 scoped_refptr<SelectFileDialog> select_file_dialog_; 603 scoped_refptr<SelectFileDialog> select_file_dialog_;
591 604
592 // The browser idle task helps cleanup unused memory resources when idle. 605 // The browser idle task helps cleanup unused memory resources when idle.
593 scoped_ptr<BrowserIdleTimer> idle_task_; 606 scoped_ptr<BrowserIdleTimer> idle_task_;
594 607
595 // Keep track of the encoding auto detect pref. 608 // Keep track of the encoding auto detect pref.
596 BooleanPrefMember encoding_auto_detect_; 609 BooleanPrefMember encoding_auto_detect_;
597 610
611 // Add a member used to store the parent window handle when running as an
612 // embedded client.
613 HWND parent_hwnd_;
614
598 DISALLOW_COPY_AND_ASSIGN(Browser); 615 DISALLOW_COPY_AND_ASSIGN(Browser);
599 }; 616 };
600 617
601 #endif // CHROME_BROWSER_BROWSER_H_ 618 #endif // CHROME_BROWSER_BROWSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698