OLD | NEW |
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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 384 |
385 virtual void ContentsMouseEvent(TabContents* source, uint32 message); | 385 virtual void ContentsMouseEvent(TabContents* source, uint32 message); |
386 virtual void UpdateTargetURL(TabContents* source, const GURL& url); | 386 virtual void UpdateTargetURL(TabContents* source, const GURL& url); |
387 | 387 |
388 virtual void ContentsZoomChange(bool zoom_in); | 388 virtual void ContentsZoomChange(bool zoom_in); |
389 virtual bool IsApplication() const; | 389 virtual bool IsApplication() const; |
390 virtual void ConvertContentsToApplication(TabContents* source); | 390 virtual void ConvertContentsToApplication(TabContents* source); |
391 virtual void ContentsStateChanged(TabContents* source); | 391 virtual void ContentsStateChanged(TabContents* source); |
392 virtual bool ShouldDisplayURLField(); | 392 virtual bool ShouldDisplayURLField(); |
393 virtual void BeforeUnloadFired(TabContents* source, | 393 virtual void BeforeUnloadFired(TabContents* source, |
394 bool proceed, | 394 bool proceed, |
395 bool* proceed_to_fire_unload); | 395 bool* proceed_to_fire_unload); |
| 396 virtual gfx::Rect GetRootWindowResizerRect() const; |
396 virtual void ShowHtmlDialog(HtmlDialogContentsDelegate* delegate, | 397 virtual void ShowHtmlDialog(HtmlDialogContentsDelegate* delegate, |
397 void* parent_window); | 398 void* parent_window); |
398 virtual void SetFocusToLocationBar(); | 399 virtual void SetFocusToLocationBar(); |
399 | 400 |
400 // Overridden from SelectFileDialog::Listener: | 401 // Overridden from SelectFileDialog::Listener: |
401 virtual void FileSelected(const std::wstring& path, void* params); | 402 virtual void FileSelected(const std::wstring& path, void* params); |
402 | 403 |
403 #endif // OS_WIN | 404 #endif // OS_WIN |
404 | 405 |
405 // Overridden from NotificationObserver: | 406 // Overridden from NotificationObserver: |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 // Clears all the state associated with processing tabs' beforeunload/unload | 484 // Clears all the state associated with processing tabs' beforeunload/unload |
484 // events since the user cancelled closing the window. | 485 // events since the user cancelled closing the window. |
485 void CancelWindowClose(); | 486 void CancelWindowClose(); |
486 | 487 |
487 // Removes |tab| from the passed |set|. | 488 // Removes |tab| from the passed |set|. |
488 // Returns whether the tab was in the set in the first place. | 489 // Returns whether the tab was in the set in the first place. |
489 // TODO(beng): this method needs a better name! | 490 // TODO(beng): this method needs a better name! |
490 bool RemoveFromSet(UnloadListenerSet* set, TabContents* tab); | 491 bool RemoveFromSet(UnloadListenerSet* set, TabContents* tab); |
491 | 492 |
492 // Cleans up state appropriately when we are trying to close the browser and | 493 // Cleans up state appropriately when we are trying to close the browser and |
493 // the tab has finished firing it's unload handler. We also use this in the | 494 // the tab has finished firing it's unload handler. We also use this in the |
494 // cases where a tab crashes or hangs even if the beforeunload/unload haven't | 495 // cases where a tab crashes or hangs even if the beforeunload/unload haven't |
495 // successfully fired. | 496 // successfully fired. |
496 void ClearUnloadState(TabContents* tab); | 497 void ClearUnloadState(TabContents* tab); |
497 #endif | 498 #endif |
498 | 499 |
499 // Assorted utility functions /////////////////////////////////////////////// | 500 // Assorted utility functions /////////////////////////////////////////////// |
500 | 501 |
501 // Retrieve the last active tabbed browser with the same profile as the | 502 // Retrieve the last active tabbed browser with the same profile as the |
502 // receiving Browser. Creates a new Browser if none are available. | 503 // receiving Browser. Creates a new Browser if none are available. |
503 Browser* GetOrCreateTabbedBrowser(); | 504 Browser* GetOrCreateTabbedBrowser(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // The browser idle task helps cleanup unused memory resources when idle. | 637 // The browser idle task helps cleanup unused memory resources when idle. |
637 scoped_ptr<BrowserIdleTimer> idle_task_; | 638 scoped_ptr<BrowserIdleTimer> idle_task_; |
638 | 639 |
639 // Keep track of the encoding auto detect pref. | 640 // Keep track of the encoding auto detect pref. |
640 BooleanPrefMember encoding_auto_detect_; | 641 BooleanPrefMember encoding_auto_detect_; |
641 | 642 |
642 DISALLOW_COPY_AND_ASSIGN(Browser); | 643 DISALLOW_COPY_AND_ASSIGN(Browser); |
643 }; | 644 }; |
644 | 645 |
645 #endif // CHROME_BROWSER_BROWSER_H_ | 646 #endif // CHROME_BROWSER_BROWSER_H_ |
OLD | NEW |